diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-04-27 15:28:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-01 14:24:31 (GMT) |
commit | e13fa223fc870ea95c6a1cfa09b61b527a1c2db5 (patch) | |
tree | 484e5094c95c38d4d3b65599020f9daadf44e98d /Source/cmMakefile.h | |
parent | b542e0c74f543954ba26048ce38776269b9ba203 (diff) | |
download | CMake-e13fa223fc870ea95c6a1cfa09b61b527a1c2db5.zip CMake-e13fa223fc870ea95c6a1cfa09b61b527a1c2db5.tar.gz CMake-e13fa223fc870ea95c6a1cfa09b61b527a1c2db5.tar.bz2 |
cmMakefile: Improve ExpandVariablesInString return type
Return `std::string const&` instead of a `const char*` that points
into a string anyway. Update call sites accordingly.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 16b2047..7a688b3 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -565,12 +565,11 @@ public: * entry in the this->Definitions map. Also \@var\@ is * expanded to match autoconf style expansions. */ - const char* ExpandVariablesInString(std::string& source) const; - const char* ExpandVariablesInString(std::string& source, bool escapeQuotes, - bool noEscapes, bool atOnly = false, - const char* filename = nullptr, - long line = -1, bool removeEmpty = false, - bool replaceAt = false) const; + const std::string& ExpandVariablesInString(std::string& source) const; + const std::string& ExpandVariablesInString( + std::string& source, bool escapeQuotes, bool noEscapes, + bool atOnly = false, const char* filename = nullptr, long line = -1, + bool removeEmpty = false, bool replaceAt = false) const; /** * Remove any remaining variables in the string. Anything with ${var} or |