summaryrefslogtreecommitdiff
path: root/Source/cmPropertyMap.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-06-03 09:26:59 +0200
committerSebastian Holtermann <sebholt@xwmw.org>2019-06-08 12:25:35 +0200
commite0a8ff31480df672e42e2382e8ed7f33ea65afb4 (patch)
treeb7a7b0e3d27d9d7c8d7c84e9f1a7ba4956e1d671 /Source/cmPropertyMap.cxx
parent8d934d861be8c2a8b43d4c421715fb1e8c0c54fd (diff)
downloadcmake-e0a8ff31480df672e42e2382e8ed7f33ea65afb4.tar.gz
cmPropertyMap: Use std::string as value container class
Diffstat (limited to 'Source/cmPropertyMap.cxx')
-rw-r--r--Source/cmPropertyMap.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index 7177a638b3..0874977f2c 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -16,7 +16,7 @@ void cmPropertyMap::SetProperty(const std::string& name, const char* value)
return;
}
- Map_[name].Set(value);
+ Map_[name] = value;
}
void cmPropertyMap::AppendProperty(const std::string& name, const char* value,
@@ -27,7 +27,13 @@ void cmPropertyMap::AppendProperty(const std::string& name, const char* value,
return;
}
- Map_[name].Append(value, asString);
+ {
+ std::string& pVal = Map_[name];
+ if (!pVal.empty() && !asString) {
+ pVal += ';';
+ }
+ pVal += value;
+ }
}
const char* cmPropertyMap::GetPropertyValue(const std::string& name) const
@@ -35,7 +41,7 @@ const char* cmPropertyMap::GetPropertyValue(const std::string& name) const
{
auto it = Map_.find(name);
if (it != Map_.end()) {
- return it->second.GetValue();
+ return it->second.c_str();
}
}
return nullptr;
@@ -56,7 +62,7 @@ std::vector<std::pair<std::string, std::string>> cmPropertyMap::GetList() const
std::vector<std::pair<std::string, std::string>> kvList;
kvList.reserve(Map_.size());
for (auto const& item : Map_) {
- kvList.emplace_back(item.first, item.second.GetValue());
+ kvList.emplace_back(item.first, item.second);
}
return kvList;
}