diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-17 16:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-17 16:09:20 (GMT) |
commit | bd891335432a5797a0415ebf35a6f22adba96684 (patch) | |
tree | 9d142b17e1750641d311d9f7fe2f11a4b7a52913 /Source/cmServerProtocol.cxx | |
parent | bee0100396d4b0dad7204125606e6baf26b79e38 (diff) | |
download | CMake-bd891335432a5797a0415ebf35a6f22adba96684.zip CMake-bd891335432a5797a0415ebf35a6f22adba96684.tar.gz CMake-bd891335432a5797a0415ebf35a6f22adba96684.tar.bz2 |
cmState::GetCacheEntryValue: return cmProp
Diffstat (limited to 'Source/cmServerProtocol.cxx')
-rw-r--r-- | Source/cmServerProtocol.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 1d4ea01..83a7f7b 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -182,7 +182,7 @@ static bool getOrTestHomeDirectory(cmState* state, std::string& value, std::string* errorMessage) { const std::string cachedValue = - std::string(state->GetCacheEntryValue("CMAKE_HOME_DIRECTORY")); + *state->GetCacheEntryValue("CMAKE_HOME_DIRECTORY"); if (value.empty()) { value = cachedValue; return true; @@ -205,9 +205,7 @@ static bool getOrTestValue(cmState* state, const std::string& key, const std::string& keyDescription, std::string* errorMessage) { - const char* entry = state->GetCacheEntryValue(key); - const std::string cachedValue = - entry == nullptr ? std::string() : std::string(entry); + const std::string cachedValue = state->GetSafeCacheEntryValue(key); if (value.empty()) { value = cachedValue; } |