diff options
author | Oleksandr Koval <oleksandr.koval.dev@gmail.com> | 2021-01-05 14:32:36 +0200 |
---|---|---|
committer | Oleksandr Koval <oleksandr.koval.dev@gmail.com> | 2021-01-05 14:32:36 +0200 |
commit | 209daa20b2bd2ee2a76e70af58e895647f7e284f (patch) | |
tree | 081f3192927b19325f40c0da459a11e5b5a5784b /Source/cmPropertyMap.cxx | |
parent | 764ce15ffbe232347a41e40509a2e485bae226f6 (diff) | |
download | cmake-209daa20b2bd2ee2a76e70af58e895647f7e284f.tar.gz |
Code style: add missed explicit 'this->'
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
Diffstat (limited to 'Source/cmPropertyMap.cxx')
-rw-r--r-- | Source/cmPropertyMap.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx index f22f36dd42..06e151ab6f 100644 --- a/Source/cmPropertyMap.cxx +++ b/Source/cmPropertyMap.cxx @@ -7,17 +7,17 @@ void cmPropertyMap::Clear() { - Map_.clear(); + this->Map_.clear(); } void cmPropertyMap::SetProperty(const std::string& name, const char* value) { if (!value) { - Map_.erase(name); + this->Map_.erase(name); return; } - Map_[name] = value; + this->Map_[name] = value; } void cmPropertyMap::AppendProperty(const std::string& name, @@ -29,7 +29,7 @@ void cmPropertyMap::AppendProperty(const std::string& name, } { - std::string& pVal = Map_[name]; + std::string& pVal = this->Map_[name]; if (!pVal.empty() && !asString) { pVal += ';'; } @@ -39,13 +39,13 @@ void cmPropertyMap::AppendProperty(const std::string& name, void cmPropertyMap::RemoveProperty(const std::string& name) { - Map_.erase(name); + this->Map_.erase(name); } cmProp cmPropertyMap::GetPropertyValue(const std::string& name) const { - auto it = Map_.find(name); - if (it != Map_.end()) { + auto it = this->Map_.find(name); + if (it != this->Map_.end()) { return &it->second; } return nullptr; @@ -54,8 +54,8 @@ cmProp cmPropertyMap::GetPropertyValue(const std::string& name) const std::vector<std::string> cmPropertyMap::GetKeys() const { std::vector<std::string> keyList; - keyList.reserve(Map_.size()); - for (auto const& item : Map_) { + keyList.reserve(this->Map_.size()); + for (auto const& item : this->Map_) { keyList.push_back(item.first); } std::sort(keyList.begin(), keyList.end()); @@ -66,8 +66,8 @@ std::vector<std::pair<std::string, std::string>> cmPropertyMap::GetList() const { using StringPair = std::pair<std::string, std::string>; std::vector<StringPair> kvList; - kvList.reserve(Map_.size()); - for (auto const& item : Map_) { + kvList.reserve(this->Map_.size()); + for (auto const& item : this->Map_) { kvList.emplace_back(item.first, item.second); } std::sort(kvList.begin(), kvList.end(), |