summaryrefslogtreecommitdiffstats
path: root/Source/cmDefinitions.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-26 14:34:13 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-29 20:49:05 (GMT)
commit818bf727c1eb4a500decb5856715a964c948242e (patch)
tree84c13db2a61b91b3b2e90db5626a6ad6449269b5 /Source/cmDefinitions.cxx
parent5067ae41b03442a7dba9210595e782678835a3ff (diff)
downloadCMake-818bf727c1eb4a500decb5856715a964c948242e.zip
CMake-818bf727c1eb4a500decb5856715a964c948242e.tar.gz
CMake-818bf727c1eb4a500decb5856715a964c948242e.tar.bz2
cmDefinitions: Change LocalKeys to return a vector.
This is more efficient and we lose nothing.
Diffstat (limited to 'Source/cmDefinitions.cxx')
-rw-r--r--Source/cmDefinitions.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index d2b37bb..448ba9d 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -58,16 +58,17 @@ void cmDefinitions::Erase(const std::string& key)
}
//----------------------------------------------------------------------------
-std::set<std::string> cmDefinitions::LocalKeys() const
+std::vector<std::string> cmDefinitions::LocalKeys() const
{
- std::set<std::string> keys;
+ std::vector<std::string> keys;
+ keys.reserve(this->Map.size());
// Consider local definitions.
for(MapType::const_iterator mi = this->Map.begin();
mi != this->Map.end(); ++mi)
{
if (mi->second.Exists)
{
- keys.insert(mi->first);
+ keys.push_back(mi->first);
}
}
return keys;