summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-07-04 02:11:46 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2022-07-11 13:14:02 (GMT)
commit468d04ef1444360cc95f685783bab9dc0e7ac43a (patch)
tree84c828b1b161fc2572106b713277122dadf9cf88
parent898ba76d1bb2a5f728c9f9dfd377de7593a4d6f5 (diff)
downloadCMake-468d04ef1444360cc95f685783bab9dc0e7ac43a.zip
CMake-468d04ef1444360cc95f685783bab9dc0e7ac43a.tar.gz
CMake-468d04ef1444360cc95f685783bab9dc0e7ac43a.tar.bz2
cmFindPackageCommand: Move methods implementation into the class definition
-rw-r--r--Source/cmFindPackageCommand.cxx43
1 files changed, 18 insertions, 25 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 068fbf8..afc63a5 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -2157,14 +2157,27 @@ public:
protected:
bool Consider(std::string const& fullPath, cmFileList& listing);
- static bool IsIgnoredEntry(const char* fname);
+ static bool IsIgnoredEntry(const char* fname)
+ {
+ assert(fname != nullptr);
+ assert(fname[0] != 0);
+ return fname[0] == '.' &&
+ (fname[1] == 0 || (fname[1] == '.' && fname[2] == 0));
+ }
private:
- bool Search(cmFileList&);
- virtual bool Search(std::string const& parent, cmFileList&) = 0;
- virtual std::unique_ptr<cmFileListGeneratorBase> Clone() const = 0;
friend class cmFileList;
- cmFileListGeneratorBase* SetNext(cmFileListGeneratorBase const& next);
+ virtual std::unique_ptr<cmFileListGeneratorBase> Clone() const = 0;
+ virtual bool Search(std::string const& parent, cmFileList&) = 0;
+ bool Search(cmFileList& listing)
+ {
+ return this->Search(std::string{}, listing);
+ }
+ cmFileListGeneratorBase* SetNext(cmFileListGeneratorBase const& next)
+ {
+ this->Next = next.Clone();
+ return this->Next.get();
+ }
std::unique_ptr<cmFileListGeneratorBase> Next;
};
@@ -2191,18 +2204,6 @@ private:
cmFileListGeneratorBase* Last = nullptr;
};
-bool cmFileListGeneratorBase::Search(cmFileList& listing)
-{
- return this->Search(std::string{}, listing);
-}
-
-cmFileListGeneratorBase* cmFileListGeneratorBase::SetNext(
- cmFileListGeneratorBase const& next)
-{
- this->Next = next.Clone();
- return this->Next.get();
-}
-
bool cmFileListGeneratorBase::Consider(std::string const& fullPath,
cmFileList& listing)
{
@@ -2214,14 +2215,6 @@ bool cmFileListGeneratorBase::Consider(std::string const& fullPath,
}
return listing.Visit(fullPath + '/');
}
-
-bool cmFileListGeneratorBase::IsIgnoredEntry(const char* const fname)
-{
- assert(fname != nullptr);
- assert(fname[0] != 0);
- return fname[0] == '.' &&
- (fname[1] == 0 || (fname[1] == '.' && fname[2] == 0));
-}
} // anonymous namespace
class cmFindPackageFileList : public cmFileList