diff options
Diffstat (limited to 'Source/cmPropertyMap.cxx')
| -rw-r--r-- | Source/cmPropertyMap.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx index 06e151a..b15000f 100644 --- a/Source/cmPropertyMap.cxx +++ b/Source/cmPropertyMap.cxx @@ -19,6 +19,15 @@ void cmPropertyMap::SetProperty(const std::string& name, const char* value) this->Map_[name] = value; } +void cmPropertyMap::SetProperty(const std::string& name, cmValue value) +{ + if (!value) { + this->Map_.erase(name); + return; + } + + this->Map_[name] = *value; +} void cmPropertyMap::AppendProperty(const std::string& name, const std::string& value, bool asString) @@ -42,11 +51,11 @@ void cmPropertyMap::RemoveProperty(const std::string& name) this->Map_.erase(name); } -cmProp cmPropertyMap::GetPropertyValue(const std::string& name) const +cmValue cmPropertyMap::GetPropertyValue(const std::string& name) const { auto it = this->Map_.find(name); if (it != this->Map_.end()) { - return &it->second; + return cmValue(it->second); } return nullptr; } |
