diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index cefd380dfd..a763f18a30 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;