diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-04 21:06:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:28 (GMT) |
commit | 3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd (patch) | |
tree | 0259dae54801daae0f5823e335cc6b608328623d /Source/cmDefinitions.h | |
parent | ec97ed7d0c67b635caf3ada65541b2eaf0818a93 (diff) | |
download | CMake-3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd.zip CMake-3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd.tar.gz CMake-3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd.tar.bz2 |
stringapi: Use strings for variable names
Variable names are always generated by CMake and should never be NULL.
Diffstat (limited to 'Source/cmDefinitions.h')
-rw-r--r-- | Source/cmDefinitions.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 4834d84..24dad29 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -35,10 +35,10 @@ 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; @@ -69,8 +69,8 @@ private: 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 {}; |