From 3b1577ab7eb2000a3477a0aa489b888fb1256434 Mon Sep 17 00:00:00 2001
From: lurumdare <8020186+lurumdare@users.noreply.github.com>
Date: 周六, 07 9月 2019 20:40:25 +0800
Subject: [PATCH] const everywhere (#30)

---
 src/tools/bootstrap/bootstrap.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/tools/bootstrap/bootstrap.cpp b/src/tools/bootstrap/bootstrap.cpp
index 4af84e9..98ad6b0 100644
--- a/src/tools/bootstrap/bootstrap.cpp
+++ b/src/tools/bootstrap/bootstrap.cpp
@@ -18,7 +18,7 @@
 	fprintf(fp, "#define PUBLIC_KEY { \\\n");
 	fprintf(fp, "%s", pbPublicKey.c_str());
 	fprintf(fp, "}\n\n");
-	int random = rand() % 1000;
+	const int random = rand() % 1000;
 	fprintf(fp, "#define SHARED_RANDOM %d;\n", random);
 	fprintf(fp, "#endif\n");
 	fclose(fp);
@@ -91,8 +91,8 @@
 		printf("********************************************\n");
 
 	}
-	string private_fname = string(argv[1]);
-	string public_fname(argv[2]);
+	const string private_fname = string(argv[1]);
+	const string public_fname(argv[2]);
 
 	if (file_exists(private_fname) || file_exists(public_fname)) {
 		printf("Key files exist, skipping key generation. Do 'make clean' to generate new keys.\n");

--
Gitblit v1.9.1