summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.h
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-01-22 15:38:05 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2021-01-27 13:45:45 (GMT)
commitcdfc4e31953274be9b745614b4b7620d365a7b5e (patch)
treed730ed1a5258286efbd83ac84e4a24f075bfa2aa /Source/cmCacheManager.h
parent808b17b1206dd70c7fbd676e8c24181cde537954 (diff)
downloadCMake-cdfc4e31953274be9b745614b4b7620d365a7b5e.zip
CMake-cdfc4e31953274be9b745614b4b7620d365a7b5e.tar.gz
CMake-cdfc4e31953274be9b745614b4b7620d365a7b5e.tar.bz2
clang-tidy: fix `readability-qualified-auto` warnings
Diffstat (limited to 'Source/cmCacheManager.h')
-rw-r--r--Source/cmCacheManager.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index 9aebffc..7a9a7dc 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -74,7 +74,7 @@ public:
cmProp GetCacheEntryValue(const std::string& key) const
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (const auto* entry = this->GetCacheEntry(key)) {
return &entry->GetValue();
}
return nullptr;
@@ -82,14 +82,14 @@ public:
void SetCacheEntryValue(std::string const& key, std::string const& value)
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (auto* entry = this->GetCacheEntry(key)) {
entry->SetValue(value.c_str());
}
}
cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key) const
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (const auto* entry = this->GetCacheEntry(key)) {
return entry->GetType();
}
return cmStateEnums::UNINITIALIZED;
@@ -98,7 +98,7 @@ public:
std::vector<std::string> GetCacheEntryPropertyList(
std::string const& key) const
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (const auto* entry = this->GetCacheEntry(key)) {
return entry->GetPropertyList();
}
return {};
@@ -107,7 +107,7 @@ public:
cmProp GetCacheEntryProperty(std::string const& key,
std::string const& propName) const
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (const auto* entry = this->GetCacheEntry(key)) {
return entry->GetProperty(propName);
}
return nullptr;
@@ -116,7 +116,7 @@ public:
bool GetCacheEntryPropertyAsBool(std::string const& key,
std::string const& propName) const
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (const auto* entry = this->GetCacheEntry(key)) {
return entry->GetPropertyAsBool(propName);
}
return false;
@@ -126,7 +126,7 @@ public:
std::string const& propName,
std::string const& value)
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (auto* entry = this->GetCacheEntry(key)) {
entry->SetProperty(propName, value.c_str());
}
}
@@ -134,7 +134,7 @@ public:
void SetCacheEntryBoolProperty(std::string const& key,
std::string const& propName, bool value)
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (auto* entry = this->GetCacheEntry(key)) {
entry->SetProperty(propName, value);
}
}
@@ -142,7 +142,7 @@ public:
void RemoveCacheEntryProperty(std::string const& key,
std::string const& propName)
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (auto* entry = this->GetCacheEntry(key)) {
entry->SetProperty(propName, nullptr);
}
}
@@ -152,7 +152,7 @@ public:
std::string const& value,
bool asString = false)
{
- if (auto entry = this->GetCacheEntry(key)) {
+ if (auto* entry = this->GetCacheEntry(key)) {
entry->AppendProperty(propName, value, asString);
}
}