diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-10 16:36:24 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-10 16:36:24 (GMT) |
commit | a16bf141bc5d393b27d13d8235d95a1b034052c2 (patch) | |
tree | 59ecd625114f6e98065e7901f418a28fc540cd45 /Source/CTest | |
parent | bd9e551c1a13f566e6ffe8cdd1262b7628ed5330 (diff) | |
download | CMake-a16bf141bc5d393b27d13d8235d95a1b034052c2.zip CMake-a16bf141bc5d393b27d13d8235d95a1b034052c2.tar.gz CMake-a16bf141bc5d393b27d13d8235d95a1b034052c2.tar.bz2 |
Add missing braces around statements.
Apply fixits of clang-tidy's readability-braces-around-statements
checker.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBZR.cxx | 9 | ||||
-rw-r--r-- | Source/CTest/cmCTestHG.cxx | 3 | ||||
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 12 | ||||
-rw-r--r-- | Source/CTest/cmCTestP4.cxx | 3 | ||||
-rw-r--r-- | Source/CTest/cmCTestSVN.cxx | 3 |
5 files changed, 20 insertions, 10 deletions
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx index dd53be8..92eb570 100644 --- a/Source/CTest/cmCTestBZR.cxx +++ b/Source/CTest/cmCTestBZR.cxx @@ -61,8 +61,9 @@ extern "C" int cmBZRXMLParserUnknownEncodingHandler(void*, // workaround for these unknown encodings. if (name == std::string("ascii") || name == std::string("cp1252") || name == std::string("ANSI_X3.4-1968")) { - for (unsigned int i = 0; i < 256; ++i) + for (unsigned int i = 0; i < 256; ++i) { info->map[i] = latin1[i]; + } return 1; } @@ -336,8 +337,9 @@ private: void DoPath(char c0, char c1, char c2, std::string path) { - if (path.empty()) + if (path.empty()) { return; + } cmSystemTools::ConvertToUnixSlashes(path); const std::string dir = cmSystemTools::GetFilenamePath(path); @@ -441,8 +443,9 @@ private: void DoPath(char c0, char c1, char c2, std::string path) { - if (path.empty()) + if (path.empty()) { return; + } cmSystemTools::ConvertToUnixSlashes(path); if (c0 == 'C') { diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx index c6cfa44..f1fe377 100644 --- a/Source/CTest/cmCTestHG.cxx +++ b/Source/CTest/cmCTestHG.cxx @@ -75,8 +75,9 @@ private: void DoPath(char status, std::string const& path) { - if (path.empty()) + if (path.empty()) { return; + } // See "hg help status". Note that there is no 'conflict' status. switch (status) { diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 7b384ad..ae97d32 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -413,12 +413,14 @@ void cmCTestMultiProcessHandler::UpdateCostData() std::string line; while (std::getline(fin, line)) { - if (line == "---") + if (line == "---") { break; + } std::vector<cmsys::String> parts = cmSystemTools::SplitString(line, ' '); // Format: <name> <previous_runs> <avg_cost> - if (parts.size() < 3) + if (parts.size() < 3) { break; + } std::string name = parts[0]; int prev = atoi(parts[1].c_str()); @@ -464,8 +466,9 @@ void cmCTestMultiProcessHandler::ReadCostData() fin.open(fname.c_str()); std::string line; while (std::getline(fin, line)) { - if (line == "---") + if (line == "---") { break; + } std::vector<cmsys::String> parts = cmSystemTools::SplitString(line, ' '); @@ -480,8 +483,9 @@ void cmCTestMultiProcessHandler::ReadCostData() float cost = static_cast<float>(atof(parts[2].c_str())); int index = this->SearchByName(name); - if (index == -1) + if (index == -1) { continue; + } this->Properties[index]->PreviousRuns = prev; // When not running in parallel mode, don't use cost data diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx index 07f9dad..ede11c9 100644 --- a/Source/CTest/cmCTestP4.cxx +++ b/Source/CTest/cmCTestP4.cxx @@ -426,8 +426,9 @@ void cmCTestP4::LoadRevisions() ChangeLists.clear(); this->RunChild(&p4_changes[0], &out, &err); - if (ChangeLists.empty()) + if (ChangeLists.empty()) { return; + } // p4 describe -s ...@1111111,2222222 std::vector<char const*> p4_describe; diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx index a6885aa..fa01411 100644 --- a/Source/CTest/cmCTestSVN.cxx +++ b/Source/CTest/cmCTestSVN.cxx @@ -271,8 +271,9 @@ bool cmCTestSVN::UpdateImpl() bool cmCTestSVN::RunSVNCommand(std::vector<char const*> const& parameters, OutputParser* out, OutputParser* err) { - if (parameters.empty()) + if (parameters.empty()) { return false; + } std::vector<char const*> args; args.push_back(this->CommandLineTool.c_str()); |