summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-06-27 02:39:43 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2022-07-11 13:14:01 (GMT)
commitf2a4e4f6fa46d04f117b1b3ed498534aa30fde84 (patch)
treede14ced7f5b90ac242b6918d6c455cd5be8062d4 /Source/cmFindPackageCommand.cxx
parenta3fe1aca0c9720e9725cec5c934c616ceeb592b1 (diff)
downloadCMake-f2a4e4f6fa46d04f117b1b3ed498534aa30fde84.zip
CMake-f2a4e4f6fa46d04f117b1b3ed498534aa30fde84.tar.gz
CMake-f2a4e4f6fa46d04f117b1b3ed498534aa30fde84.tar.bz2
cmFindPackageCommand: Simplify if-return-else-return into single return stmt
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index cefd380..a763f18 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -2176,13 +2176,7 @@ public:
}
return *this;
}
- bool Search()
- {
- if (this->First) {
- return this->First->Search(*this);
- }
- return false;
- }
+ bool Search() { return this->First && this->First->Search(*this); }
private:
virtual bool Visit(std::string const& fullPath) = 0;