diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-01-21 15:43:47 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-01-22 20:28:41 (GMT) |
commit | bf1e1bf1d0a8a966af0c8e454d0bc11b5ed874e1 (patch) | |
tree | b8e129e96d5445f48e1aac07bab6a532e735c688 /Source/cmMakefile.cxx | |
parent | 01d7ceda5dda53125da2bce994114ca5154bf365 (diff) | |
download | CMake-bf1e1bf1d0a8a966af0c8e454d0bc11b5ed874e1.zip CMake-bf1e1bf1d0a8a966af0c8e454d0bc11b5ed874e1.tar.gz CMake-bf1e1bf1d0a8a966af0c8e454d0bc11b5ed874e1.tar.bz2 |
cmMakefile: Make FindSourceGroup const.
Return a pointer instead of a reference. This allows making the accessor
const with the least impact.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ebc816e..fa8918e 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2775,9 +2775,9 @@ cmMakefile::GetConfigurations(std::vector<std::string>& configs, * non-inherited SOURCE_GROUP commands will have precedence over * inherited ones. */ -cmSourceGroup& +cmSourceGroup* cmMakefile::FindSourceGroup(const char* source, - std::vector<cmSourceGroup> &groups) + std::vector<cmSourceGroup> &groups) const { // First search for a group that lists the file explicitly. for(std::vector<cmSourceGroup>::reverse_iterator sg = groups.rbegin(); @@ -2786,7 +2786,7 @@ cmMakefile::FindSourceGroup(const char* source, cmSourceGroup *result = sg->MatchChildrenFiles(source); if(result) { - return *result; + return result; } } @@ -2797,13 +2797,13 @@ cmMakefile::FindSourceGroup(const char* source, cmSourceGroup *result = sg->MatchChildrenRegex(source); if(result) { - return *result; + return result; } } // Shouldn't get here, but just in case, return the default group. - return groups.front(); + return &groups.front(); } #endif |