summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2019-07-05 23:51:06 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-15 12:17:34 (GMT)
commit9b6a53292f9183bd5ae59c24f8fc1d76c5e187c8 (patch)
tree5de0b6c528c241b4606c73b3539280fed31e4690
parentf56393f0bd4d54db7885e89e8019c5e790bd6aa6 (diff)
downloadCMake-9b6a53292f9183bd5ae59c24f8fc1d76c5e187c8.zip
CMake-9b6a53292f9183bd5ae59c24f8fc1d76c5e187c8.tar.gz
CMake-9b6a53292f9183bd5ae59c24f8fc1d76c5e187c8.tar.bz2
Refactor: Eliminate `sep` from the loop
-rw-r--r--Source/cmProjectCommand.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 8615ecc..a703e40 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -227,7 +227,6 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
}
std::string vs;
- const char* sep = "";
char vb[4][64];
unsigned int v[4] = { 0, 0, 0, 0 };
int vc =
@@ -235,9 +234,8 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
for (int i = 0; i < 4; ++i) {
if (i < vc) {
sprintf(vb[i], "%u", v[i]);
- vs += sep;
+ vs += &"."[size_t(i == 0)];
vs += vb[i];
- sep = ".";
} else {
vb[i][0] = 0;
}