summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.h
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-05-26 09:09:07 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-05-26 12:48:22 (GMT)
commitaa5fed5052f903614a06c55786a1f682fee787a5 (patch)
treeadcf76aa35a0f8aab8b0a15db3be43cfd773855c /Source/cmCacheManager.h
parenta645a80040d35162ba34ddec39b1b90b2466b72f (diff)
downloadCMake-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.h5
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);
}
}