summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-17 16:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-17 16:09:20 (GMT)
commitbd891335432a5797a0415ebf35a6f22adba96684 (patch)
tree9d142b17e1750641d311d9f7fe2f11a4b7a52913 /Source/cmState.cxx
parentbee0100396d4b0dad7204125606e6baf26b79e38 (diff)
downloadCMake-bd891335432a5797a0415ebf35a6f22adba96684.zip
CMake-bd891335432a5797a0415ebf35a6f22adba96684.tar.gz
CMake-bd891335432a5797a0415ebf35a6f22adba96684.tar.bz2
cmState::GetCacheEntryValue: return cmProp
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index f424afa..bc08223 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -132,23 +132,22 @@ std::vector<std::string> cmState::GetCacheEntryKeys() const
return definitions;
}
-const char* cmState::GetCacheEntryValue(std::string const& key) const
+cmProp cmState::GetCacheEntryValue(std::string const& key) const
{
cmCacheManager::CacheEntry* e = this->CacheManager->GetCacheEntry(key);
if (!e) {
return nullptr;
}
- return e->Value.c_str();
+ return &e->Value;
}
std::string cmState::GetSafeCacheEntryValue(std::string const& key) const
{
- std::string retval;
- auto val = this->GetCacheEntryValue(key);
+ cmProp val = this->GetCacheEntryValue(key);
if (val) {
- retval = val;
+ return *val;
}
- return retval;
+ return std::string();
}
const std::string* cmState::GetInitializedCacheValue(