summaryrefslogtreecommitdiffstats
path: root/Source/cmDefinitions.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-29 21:48:43 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-29 21:54:20 (GMT)
commitf79cd99d6dcdfcdcd341c5ea90a5f2d9c4d6d3bc (patch)
tree496c6ecc435a3f6f87293d5ca119f6675a736be7 /Source/cmDefinitions.cxx
parentaa4d1ee80f1ced5b09335cc84bdd373c0875fd80 (diff)
downloadCMake-f79cd99d6dcdfcdcd341c5ea90a5f2d9c4d6d3bc.zip
CMake-f79cd99d6dcdfcdcd341c5ea90a5f2d9c4d6d3bc.tar.gz
CMake-f79cd99d6dcdfcdcd341c5ea90a5f2d9c4d6d3bc.tar.bz2
cmDefinitions: Implement MakeClosure in terms of reverse iterators.
Iterate directly over the parent content provided by cmMakefile.
Diffstat (limited to 'Source/cmDefinitions.cxx')
-rw-r--r--Source/cmDefinitions.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index d1fbe74..718d9ec 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -76,27 +76,27 @@ std::vector<std::string> cmDefinitions::LocalKeys() const
//----------------------------------------------------------------------------
cmDefinitions cmDefinitions::MakeClosure(
- std::list<cmDefinitions const*>::iterator begin,
- std::list<cmDefinitions const*>::iterator end)
+ std::list<cmDefinitions>::const_reverse_iterator rbegin,
+ std::list<cmDefinitions>::const_reverse_iterator rend)
{
std::set<std::string> undefined;
cmDefinitions closure;
- closure.MakeClosure(undefined, begin, end);
+ closure.MakeClosure(undefined, rbegin, rend);
return closure;
}
//----------------------------------------------------------------------------
void
cmDefinitions::MakeClosure(std::set<std::string>& undefined,
- std::list<cmDefinitions const*>::iterator begin,
- std::list<cmDefinitions const*>::iterator end)
+ std::list<cmDefinitions>::const_reverse_iterator rbegin,
+ std::list<cmDefinitions>::const_reverse_iterator rend)
{
- for (std::list<cmDefinitions const*>::const_iterator it = begin;
- it != end; ++it)
+ for (std::list<cmDefinitions>::const_reverse_iterator it = rbegin;
+ it != rend; ++it)
{
// Consider local definitions.
- for(MapType::const_iterator mi = (*it)->Map.begin();
- mi != (*it)->Map.end(); ++mi)
+ for(MapType::const_iterator mi = it->Map.begin();
+ mi != it->Map.end(); ++mi)
{
// Use this key if it is not already set or unset.
if(this->Map.find(mi->first) == this->Map.end() &&