cmSourceGroup: code improvements; use std::string and C++11 loops

Topic-rename: cmSourceGroup-modern-cxx
This commit is contained in:
Vitaly Stakhovsky
2018-01-10 19:01:49 -05:00
parent ddc4f9a3c0
commit 969c1f94ae
3 changed files with 24 additions and 46 deletions
+6 -6
View File
@@ -26,7 +26,7 @@ class cmSourceGroupInternals;
class cmSourceGroup
{
public:
cmSourceGroup(const char* name, const char* regex,
cmSourceGroup(const std::string& name, const char* regex,
const char* parentName = nullptr);
cmSourceGroup(cmSourceGroup const& r);
~cmSourceGroup();
@@ -50,7 +50,7 @@ public:
/**
* Looks up child and returns it
*/
cmSourceGroup* LookupChild(const char* name) const;
cmSourceGroup* LookupChild(const std::string& name);
/**
* Get the name of this group.
@@ -65,23 +65,23 @@ public:
/**
* Check if the given name matches this group's regex.
*/
bool MatchesRegex(const char* name);
bool MatchesRegex(const std::string& name);
/**
* Check if the given name matches this group's explicit file list.
*/
bool MatchesFiles(const char* name);
bool MatchesFiles(const std::string& name) const;
/**
* Check if the given name matches this group's explicit file list
* in children.
*/
cmSourceGroup* MatchChildrenFiles(const char* name);
cmSourceGroup* MatchChildrenFiles(const std::string& name);
/**
* Check if the given name matches this group's regex in children.
*/
cmSourceGroup* MatchChildrenRegex(const char* name);
cmSourceGroup* MatchChildrenRegex(const std::string& name);
/**
* Assign the given source file to this group. Used only by