diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-06-02 12:35:33 +0200 |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-06-08 12:25:35 +0200 |
commit | 9e64e617eb295c7e2725d871225659ae7bcf7c48 (patch) | |
tree | 5356b70a28cd1ad5de06dcadc035489b6645c529 /Source/cmPropertyMap.cxx | |
parent | f4bbeb785c8f673a5cff326cc717d0dfbb2734a2 (diff) | |
download | cmake-9e64e617eb295c7e2725d871225659ae7bcf7c48.tar.gz |
cmPropertyMap: Rename GetPropertyList method to GetKeys
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 3f6d7c8a9f..a97e1f0713 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; +} |