diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-05-26 09:09:07 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-05-26 12:48:22 (GMT) |
commit | aa5fed5052f903614a06c55786a1f682fee787a5 (patch) | |
tree | adcf76aa35a0f8aab8b0a15db3be43cfd773855c /Source/cmCacheManager.h | |
parent | a645a80040d35162ba34ddec39b1b90b2466b72f (diff) | |
download | CMake-aa5fed5052f903614a06c55786a1f682fee787a5.zip CMake-aa5fed5052f903614a06c55786a1f682fee787a5.tar.gz CMake-aa5fed5052f903614a06c55786a1f682fee787a5.tar.bz2 |
SetProperty: suppress raw pointer usage
Diffstat (limited to 'Source/cmCacheManager.h')
-rw-r--r-- | Source/cmCacheManager.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index bc3fb51..a2da0b5 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -39,8 +39,9 @@ class cmCacheManager std::vector<std::string> GetPropertyList() const; cmValue GetProperty(const std::string& property) const; bool GetPropertyAsBool(const std::string& property) const; - void SetProperty(const std::string& property, const char* value); + void SetProperty(const std::string& property, const std::string& value); void SetProperty(const std::string& property, bool value); + void SetProperty(const std::string& property, std::nullptr_t); void AppendProperty(const std::string& property, const std::string& value, bool asString = false); @@ -127,7 +128,7 @@ public: std::string const& value) { if (auto* entry = this->GetCacheEntry(key)) { - entry->SetProperty(propName, value.c_str()); + entry->SetProperty(propName, value); } } |