summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-10-21 19:32:43 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-10-21 19:32:43 (GMT)
commit569509f4bfbf44c67e237a01f957fdfe52223cfa (patch)
treefae8b2848d52b1f3ba8ed8f50f5e4135f170ee95 /Source/cmFindPackageCommand.cxx
parent6c9b3b5c03b41842d3d79c1bd80691be7e5c6f89 (diff)
downloadCMake-569509f4bfbf44c67e237a01f957fdfe52223cfa.zip
CMake-569509f4bfbf44c67e237a01f957fdfe52223cfa.tar.gz
CMake-569509f4bfbf44c67e237a01f957fdfe52223cfa.tar.bz2
Fix newly discovered clang-tidy issues
Clang-tidy reports some issues only from the currently compiled source file and its associated header file. Separating the compilation of commands exposed some clang-tidy issues that were not reported previously. Fix them.
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 2784e16..373b728 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -673,8 +673,8 @@ bool cmFindPackageCommand::HandlePackageMode()
bool configFileSetFOUNDFalse = false;
if (fileFound) {
- if ((this->Makefile->IsDefinitionSet(foundVar)) &&
- (this->Makefile->IsOn(foundVar) == false)) {
+ if (this->Makefile->IsDefinitionSet(foundVar) &&
+ !this->Makefile->IsOn(foundVar)) {
// by removing Foo_FOUND here if it is FALSE, we don't really change
// the situation for the Config file which is about to be included,
// but we make it possible to detect later on whether the Config file
@@ -693,8 +693,8 @@ bool cmFindPackageCommand::HandlePackageMode()
found = true;
// Check whether the Config file has set Foo_FOUND to FALSE:
- if ((this->Makefile->IsDefinitionSet(foundVar)) &&
- (this->Makefile->IsOn(foundVar) == false)) {
+ if (this->Makefile->IsDefinitionSet(foundVar) &&
+ !this->Makefile->IsOn(foundVar)) {
// we get here if the Config file has set Foo_FOUND actively to FALSE
found = false;
configFileSetFOUNDFalse = true;
@@ -1416,8 +1416,7 @@ bool cmFindPackageCommand::CheckVersion(std::string const& config_file)
// Look for foo-config-version.cmake
std::string version_file = version_file_base;
version_file += "-version.cmake";
- if ((haveResult == false) &&
- (cmSystemTools::FileExists(version_file.c_str(), true))) {
+ if (!haveResult && cmSystemTools::FileExists(version_file.c_str(), true)) {
result = this->CheckVersionFile(version_file, version);
haveResult = true;
}
@@ -1425,14 +1424,13 @@ bool cmFindPackageCommand::CheckVersion(std::string const& config_file)
// Look for fooConfigVersion.cmake
version_file = version_file_base;
version_file += "Version.cmake";
- if ((haveResult == false) &&
- (cmSystemTools::FileExists(version_file.c_str(), true))) {
+ if (!haveResult && cmSystemTools::FileExists(version_file.c_str(), true)) {
result = this->CheckVersionFile(version_file, version);
haveResult = true;
}
// If no version was requested a versionless package is acceptable.
- if ((haveResult == false) && (this->Version.empty())) {
+ if (!haveResult && this->Version.empty()) {
result = true;
}