summaryrefslogtreecommitdiffstats
path: root/Source/cmDefinitions.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-29 13:36:55 (GMT)
committerBrad King <brad.king@kitware.com>2014-04-29 13:36:55 (GMT)
commitbbc358c3fc1f09fe2a483996ae1359dba3f587f4 (patch)
treeacbe60addb92ac90fc7c91f187a9d9226c2a95dd /Source/cmDefinitions.h
parent0cce556b5fbe629dccee294aeece7c275343ed64 (diff)
parentc51d07d4397ceed55c534a036ef81df44b741ff6 (diff)
downloadCMake-bbc358c3fc1f09fe2a483996ae1359dba3f587f4.zip
CMake-bbc358c3fc1f09fe2a483996ae1359dba3f587f4.tar.gz
CMake-bbc358c3fc1f09fe2a483996ae1359dba3f587f4.tar.bz2
Merge branch 'master' into osx-init-early
Resolve conflict in Source/cmGlobalGenerator.cxx by integrating changes from both sides.
Diffstat (limited to 'Source/cmDefinitions.h')
-rw-r--r--Source/cmDefinitions.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index 4834d84..d615fb0 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -35,28 +35,32 @@ public:
/** Get the value associated with a key; null if none.
Store the result locally if it came from a parent. */
- const char* Get(const char* key);
+ const char* Get(const std::string& key);
/** Set (or unset if null) a value associated with a key. */
- const char* Set(const char* key, const char* value);
+ const char* Set(const std::string& key, const char* value);
/** Get the set of all local keys. */
- std::set<cmStdString> LocalKeys() const;
+ std::set<std::string> LocalKeys() const;
/** Compute the closure of all defined keys with values.
This flattens the scope. The result has no parent. */
cmDefinitions Closure() const;
/** Compute the set of all defined keys. */
- std::set<cmStdString> ClosureKeys() const;
+ std::set<std::string> ClosureKeys() const;
private:
// String with existence boolean.
- struct Def: public cmStdString
+ struct Def: public std::string
{
- Def(): cmStdString(), Exists(false) {}
- Def(const char* v): cmStdString(v?v:""), Exists(v?true:false) {}
- Def(Def const& d): cmStdString(d), Exists(d.Exists) {}
+ private:
+ typedef std::string std_string;
+ public:
+ Def(): std_string(), Exists(false) {}
+ Def(const char* v): std_string(v?v:""), Exists(v?true:false) {}
+ Def(const std_string& v): std_string(v), Exists(true) {}
+ Def(Def const& d): std_string(d), Exists(d.Exists) {}
bool Exists;
};
static Def NoDef;
@@ -65,22 +69,22 @@ private:
cmDefinitions* Up;
// Local definitions, set or unset.
- typedef std::map<cmStdString, Def> MapType;
+ typedef std::map<std::string, Def> MapType;
MapType Map;
// Internal query and update methods.
- Def const& GetInternal(const char* key);
- Def const& SetInternal(const char* key, Def const& def);
+ Def const& GetInternal(const std::string& key);
+ Def const& SetInternal(const std::string& key, Def const& def);
// Implementation of Closure() method.
struct ClosureTag {};
cmDefinitions(ClosureTag const&, cmDefinitions const* root);
- void ClosureImpl(std::set<cmStdString>& undefined,
+ void ClosureImpl(std::set<std::string>& undefined,
cmDefinitions const* defs);
// Implementation of ClosureKeys() method.
- void ClosureKeys(std::set<cmStdString>& defined,
- std::set<cmStdString>& undefined) const;
+ void ClosureKeys(std::set<std::string>& defined,
+ std::set<std::string>& undefined) const;
};
#endif