diff options
Diffstat (limited to 'Source/cmPropertyMap.cxx')
-rw-r--r-- | Source/cmPropertyMap.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx index 3f6d7c8..a97e1f0 100644 --- a/Source/cmPropertyMap.cxx +++ b/Source/cmPropertyMap.cxx @@ -2,7 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmPropertyMap.h" -#include <algorithm> #include <assert.h> #include <utility> @@ -18,16 +17,6 @@ cmProperty* cmPropertyMap::GetOrCreateProperty(const std::string& name) return prop; } -std::vector<std::string> cmPropertyMap::GetPropertyList() const -{ - std::vector<std::string> keyList; - for (auto const& i : *this) { - keyList.push_back(i.first); - } - std::sort(keyList.begin(), keyList.end()); - return keyList; -} - void cmPropertyMap::SetProperty(const std::string& name, const char* value) { if (!value) { @@ -61,3 +50,13 @@ const char* cmPropertyMap::GetPropertyValue(const std::string& name) const } return it->second.GetValue(); } + +std::vector<std::string> cmPropertyMap::GetKeys() const +{ + std::vector<std::string> keyList; + keyList.reserve(this->size()); + for (auto const& item : *this) { + keyList.push_back(item.first); + } + return keyList; +} |