summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-01-06 05:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-01-06 05:26:28 (GMT)
commit93e9d10c7ff39f5305109bcd018e8582a7587c1b (patch)
tree90fc3be45b969dabac8b32bd24801e428b29c44d /Source/cmState.cxx
parent3f8be0ad6678ddd5ed42992fc0253740eddc9ec2 (diff)
downloadCMake-93e9d10c7ff39f5305109bcd018e8582a7587c1b.zip
CMake-93e9d10c7ff39f5305109bcd018e8582a7587c1b.tar.gz
CMake-93e9d10c7ff39f5305109bcd018e8582a7587c1b.tar.bz2
cmCacheManager: more members use std::string
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx26
1 files changed, 10 insertions, 16 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 9d83a72..35f07a1 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -150,8 +150,7 @@ const std::string* cmState::GetInitializedCacheValue(
cmStateEnums::CacheEntryType cmState::GetCacheEntryType(
std::string const& key) const
{
- cmCacheManager::CacheIterator it =
- this->CacheManager->GetCacheIterator(key.c_str());
+ cmCacheManager::CacheIterator it = this->CacheManager->GetCacheIterator(key);
return it.GetType();
}
@@ -165,8 +164,7 @@ void cmState::SetCacheEntryProperty(std::string const& key,
std::string const& propertyName,
std::string const& value)
{
- cmCacheManager::CacheIterator it =
- this->CacheManager->GetCacheIterator(key.c_str());
+ cmCacheManager::CacheIterator it = this->CacheManager->GetCacheIterator(key);
it.SetProperty(propertyName, value.c_str());
}
@@ -174,24 +172,21 @@ void cmState::SetCacheEntryBoolProperty(std::string const& key,
std::string const& propertyName,
bool value)
{
- cmCacheManager::CacheIterator it =
- this->CacheManager->GetCacheIterator(key.c_str());
+ cmCacheManager::CacheIterator it = this->CacheManager->GetCacheIterator(key);
it.SetProperty(propertyName, value);
}
std::vector<std::string> cmState::GetCacheEntryPropertyList(
const std::string& key)
{
- cmCacheManager::CacheIterator it =
- this->CacheManager->GetCacheIterator(key.c_str());
+ cmCacheManager::CacheIterator it = this->CacheManager->GetCacheIterator(key);
return it.GetPropertyList();
}
const char* cmState::GetCacheEntryProperty(std::string const& key,
std::string const& propertyName)
{
- cmCacheManager::CacheIterator it =
- this->CacheManager->GetCacheIterator(key.c_str());
+ cmCacheManager::CacheIterator it = this->CacheManager->GetCacheIterator(key);
if (!it.PropertyExists(propertyName)) {
return nullptr;
}
@@ -201,8 +196,8 @@ const char* cmState::GetCacheEntryProperty(std::string const& key,
bool cmState::GetCacheEntryPropertyAsBool(std::string const& key,
std::string const& propertyName)
{
- return this->CacheManager->GetCacheIterator(key.c_str())
- .GetPropertyAsBool(propertyName);
+ return this->CacheManager->GetCacheIterator(key).GetPropertyAsBool(
+ propertyName);
}
void cmState::AddCacheEntry(const std::string& key, const char* value,
@@ -254,15 +249,14 @@ void cmState::AppendCacheEntryProperty(const std::string& key,
const std::string& property,
const std::string& value, bool asString)
{
- this->CacheManager->GetCacheIterator(key.c_str())
- .AppendProperty(property, value.c_str(), asString);
+ this->CacheManager->GetCacheIterator(key).AppendProperty(property, value,
+ asString);
}
void cmState::RemoveCacheEntryProperty(std::string const& key,
std::string const& propertyName)
{
- this->CacheManager->GetCacheIterator(key.c_str())
- .SetProperty(propertyName, nullptr);
+ this->CacheManager->GetCacheIterator(key).SetProperty(propertyName, nullptr);
}
cmStateSnapshot cmState::Reset()