diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-04 13:08:17 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-08 14:19:08 (GMT) |
commit | e5cd39ca80c8c234118ded33a1576c1be281aa9e (patch) | |
tree | 0494dad04188959dd6cefc9497688718ff88006b /Source/cmCacheManager.cxx | |
parent | 350065bb855a26692ed6af04870f144ae1f6a886 (diff) | |
download | CMake-e5cd39ca80c8c234118ded33a1576c1be281aa9e.zip CMake-e5cd39ca80c8c234118ded33a1576c1be281aa9e.tar.gz CMake-e5cd39ca80c8c234118ded33a1576c1be281aa9e.tar.bz2 |
cmProp: refactoring: transform alias in class
To handle safely the values used by CMake variables and properties,
introduce the class cmProp as a replacement from the simple pointer
to std::string instance.
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 1a950df..8fefaa6 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -500,7 +500,7 @@ cmProp cmCacheManager::GetInitializedCacheValue(const std::string& key) const { if (const auto* entry = this->GetCacheEntry(key)) { if (entry->Initialized) { - return &entry->GetValue(); + return cmProp(entry->GetValue()); } } return nullptr; @@ -568,10 +568,10 @@ std::vector<std::string> cmCacheManager::CacheEntry::GetPropertyList() const cmProp cmCacheManager::CacheEntry::GetProperty(const std::string& prop) const { if (prop == "TYPE") { - return &cmState::CacheEntryTypeToString(this->Type); + return cmProp(cmState::CacheEntryTypeToString(this->Type)); } if (prop == "VALUE") { - return &this->Value; + return cmProp(this->Value); } return this->Properties.GetPropertyValue(prop); } |