diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-01-11 00:01:49 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-01-11 00:01:49 (GMT) |
commit | 969c1f94aed7abbc71dc73b442817fe86a43b4df (patch) | |
tree | 2cbd35560536950b8a82518a16c2cf43096f3a13 /Source/cmSourceGroup.h | |
parent | ddc4f9a3c05fa24240fde1ba6c0ab28b7d2e91ea (diff) | |
download | CMake-969c1f94aed7abbc71dc73b442817fe86a43b4df.zip CMake-969c1f94aed7abbc71dc73b442817fe86a43b4df.tar.gz CMake-969c1f94aed7abbc71dc73b442817fe86a43b4df.tar.bz2 |
cmSourceGroup: code improvements; use std::string and C++11 loops
Topic-rename: cmSourceGroup-modern-cxx
Diffstat (limited to 'Source/cmSourceGroup.h')
-rw-r--r-- | Source/cmSourceGroup.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index 7c7c35f..b39f8dd 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -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 |