diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-09-06 00:08:17 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-09-06 00:08:17 (GMT) |
commit | 437d0c16c72a45da8c81919f953859f5af71b19b (patch) | |
tree | 2a456a93a0eddf55d46313bd6d1bfbe668324d22 /Source/cmDefinitions.cxx | |
parent | b0f769ad2da5162f7f65e13061b18b4538f06d9a (diff) | |
download | CMake-437d0c16c72a45da8c81919f953859f5af71b19b.zip CMake-437d0c16c72a45da8c81919f953859f5af71b19b.tar.gz CMake-437d0c16c72a45da8c81919f953859f5af71b19b.tar.bz2 |
cmStateSnapshot::GetDefinition(): Return std::string const*
Expose std::string type used internally in cmDefinitions instead of const char*
Diffstat (limited to 'Source/cmDefinitions.cxx')
-rw-r--r-- | Source/cmDefinitions.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index e766854..5fafaf9 100644 --- a/Source/cmDefinitions.cxx +++ b/Source/cmDefinitions.cxx @@ -30,11 +30,11 @@ cmDefinitions::Def const& cmDefinitions::GetInternal(const std::string& key, return begin->Map.insert(MapType::value_type(key, def)).first->second; } -const char* cmDefinitions::Get(const std::string& key, StackIter begin, - StackIter end) +const std::string* cmDefinitions::Get(const std::string& key, StackIter begin, + StackIter end) { Def const& def = cmDefinitions::GetInternal(key, begin, end, false); - return def.Exists ? def.c_str() : nullptr; + return def.Exists ? &def : nullptr; } void cmDefinitions::Raise(const std::string& key, StackIter begin, |