diff options
author | Brad King <brad.king@kitware.com> | 2016-10-20 12:51:09 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-10-20 12:51:09 (GMT) |
commit | a5f4463eedc31f6f552b7f7837212661349898df (patch) | |
tree | 201aa79bedda91071ee8710d1b2b3f69f3e19047 /Source/cmServerProtocol.cxx | |
parent | 92c3cab223845ca83533bba7b6d73f6180223935 (diff) | |
parent | effa6c8343fb871574cb5471de5eb4c1705dd334 (diff) | |
download | CMake-a5f4463eedc31f6f552b7f7837212661349898df.zip CMake-a5f4463eedc31f6f552b7f7837212661349898df.tar.gz CMake-a5f4463eedc31f6f552b7f7837212661349898df.tar.bz2 |
Merge topic 'clang-tidy'
effa6c83 fix more issues reported by clang-tidy
fb461cac silence selected clang-tidy violations
Diffstat (limited to 'Source/cmServerProtocol.cxx')
-rw-r--r-- | Source/cmServerProtocol.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index d332ed7..e50878b 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -41,8 +41,9 @@ static std::vector<std::string> getConfigurations(const cmake* cm) } makefiles[0]->GetConfigurations(configurations); - if (configurations.empty()) + if (configurations.empty()) { configurations.push_back(""); + } return configurations; } @@ -95,20 +96,24 @@ static void getCMakeInputs(const cmGlobalGenerator* gg, if (!sourceDir.empty()) { const std::string& relative = cmSystemTools::RelativePath(sourceDir.c_str(), jt->c_str()); - if (toAdd.size() > relative.size()) + if (toAdd.size() > relative.size()) { toAdd = relative; + } } if (isInternal) { - if (internalFiles) + if (internalFiles) { internalFiles->push_back(toAdd); + } } else { if (isTemporary) { - if (tmpFiles) + if (tmpFiles) { tmpFiles->push_back(toAdd); + } } else { - if (explicitFiles) + if (explicitFiles) { explicitFiles->push_back(toAdd); + } } } } @@ -671,8 +676,9 @@ static Json::Value DumpSourceFilesList( Json::Value result = Json::arrayValue; for (auto it = fileGroups.begin(); it != fileGroups.end(); ++it) { Json::Value group = DumpSourceFileGroup(it->first, it->second, baseDir); - if (!group.isNull()) + if (!group.isNull()) { result.append(group); + } } return result; @@ -820,8 +826,8 @@ static Json::Value DumpProjectList(const cmake* cm, const std::string config) Json::Value pObj = Json::objectValue; pObj[kNAME_KEY] = projectIt.first; - assert(projectIt.second.size() > - 0); // All Projects must have at least one local generator + // All Projects must have at least one local generator + assert(!projectIt.second.empty()); const cmLocalGenerator* lg = projectIt.second.at(0); // Project structure information: |