summaryrefslogtreecommitdiffstats
path: root/Source/cmDefinitions.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-16 03:33:25 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-17 14:50:18 (GMT)
commit98c5c90361f89f810cdd6fb233f3e822b638f143 (patch)
treedb1865bcd38c85b8381cca56ff8e093f93004fe2 /Source/cmDefinitions.h
parent7872201bf69610579b6b1fab4b5389b692c82089 (diff)
downloadCMake-98c5c90361f89f810cdd6fb233f3e822b638f143.zip
CMake-98c5c90361f89f810cdd6fb233f3e822b638f143.tar.gz
CMake-98c5c90361f89f810cdd6fb233f3e822b638f143.tar.bz2
cmDefinitions: Centralize knowledge of iterator type.
Currently we process a list of definitions, but that will change.
Diffstat (limited to 'Source/cmDefinitions.h')
-rw-r--r--Source/cmDefinitions.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index e762b41..b95ae6b 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -28,12 +28,13 @@
*/
class cmDefinitions
{
+ typedef std::list<cmDefinitions>::reverse_iterator StackIter;
+ typedef std::list<cmDefinitions>::const_reverse_iterator StackConstIter;
public:
/** Get the value associated with a key; null if none.
Store the result locally if it came from a parent. */
static const char* Get(const std::string& key,
- std::list<cmDefinitions>::reverse_iterator rbegin,
- std::list<cmDefinitions>::reverse_iterator rend);
+ StackIter begin, StackIter end);
/** Set (or unset if null) a value associated with a key. */
void Set(const std::string& key, const char* value);
@@ -46,9 +47,7 @@ public:
std::vector<std::string>
ClosureKeys(std::set<std::string>& bound) const;
- static cmDefinitions MakeClosure(
- std::list<cmDefinitions>::const_reverse_iterator rbegin,
- std::list<cmDefinitions>::const_reverse_iterator rend);
+ static cmDefinitions MakeClosure(StackConstIter begin, StackConstIter end);
private:
// String with existence boolean.
@@ -74,8 +73,7 @@ private:
MapType Map;
static Def const& GetInternal(const std::string& key,
- std::list<cmDefinitions>::reverse_iterator rbegin,
- std::list<cmDefinitions>::reverse_iterator rend);
+ StackIter begin, StackIter end);
};
#endif