summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.h
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-05-28 14:27:03 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-05-30 14:41:59 (GMT)
commit4fc322bab421a83b12977aadc7dca247db8ae541 (patch)
tree3e57b548bd2326f3a848eb23ad66da33d28f60b5 /Source/cmCacheManager.h
parentb0d1ddb7234950374977b83f8dbded806c15b356 (diff)
downloadCMake-4fc322bab421a83b12977aadc7dca247db8ae541.zip
CMake-4fc322bab421a83b12977aadc7dca247db8ae541.tar.gz
CMake-4fc322bab421a83b12977aadc7dca247db8ae541.tar.bz2
AddCacheEntry: Suppress raw pointer usage
Diffstat (limited to 'Source/cmCacheManager.h')
-rw-r--r--Source/cmCacheManager.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index a2da0b5..5268248 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -173,20 +173,19 @@ public:
unsigned int GetCacheMinorVersion() const { return this->CacheMinorVersion; }
//! Add an entry into the cache
- void AddCacheEntry(const std::string& key, const char* value,
- const char* helpString, cmStateEnums::CacheEntryType type)
- {
- this->AddCacheEntry(key,
- value ? cmValue(std::string(value)) : cmValue(nullptr),
- helpString, type);
- }
void AddCacheEntry(const std::string& key, const std::string& value,
- const char* helpString, cmStateEnums::CacheEntryType type)
+ const std::string& helpString,
+ cmStateEnums::CacheEntryType type)
{
- this->AddCacheEntry(key, cmValue(value), helpString, type);
+ this->AddCacheEntry(key, cmValue{ value }, cmValue{ helpString }, type);
}
void AddCacheEntry(const std::string& key, cmValue value,
- const char* helpString,
+ const std::string& helpString,
+ cmStateEnums::CacheEntryType type)
+ {
+ this->AddCacheEntry(key, value, cmValue{ helpString }, type);
+ }
+ void AddCacheEntry(const std::string& key, cmValue value, cmValue helpString,
cmStateEnums::CacheEntryType type);
//! Remove an entry from the cache