summaryrefslogtreecommitdiffstats
path: root/Source/cmDefinitions.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-04 21:06:56 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:28 (GMT)
commit3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd (patch)
tree0259dae54801daae0f5823e335cc6b608328623d /Source/cmDefinitions.cxx
parentec97ed7d0c67b635caf3ada65541b2eaf0818a93 (diff)
downloadCMake-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.cxx')
-rw-r--r--Source/cmDefinitions.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 9d28700..5fa3877 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -28,7 +28,7 @@ void cmDefinitions::Reset(cmDefinitions* parent)
//----------------------------------------------------------------------------
cmDefinitions::Def const&
-cmDefinitions::GetInternal(const char* key)
+cmDefinitions::GetInternal(const std::string& key)
{
MapType::const_iterator i = this->Map.find(key);
if(i != this->Map.end())
@@ -46,7 +46,7 @@ cmDefinitions::GetInternal(const char* key)
//----------------------------------------------------------------------------
cmDefinitions::Def const&
-cmDefinitions::SetInternal(const char* key, Def const& def)
+cmDefinitions::SetInternal(const std::string& key, Def const& def)
{
if(this->Up || def.Exists)
{
@@ -71,14 +71,14 @@ cmDefinitions::SetInternal(const char* key, Def const& def)
}
//----------------------------------------------------------------------------
-const char* cmDefinitions::Get(const char* key)
+const char* cmDefinitions::Get(const std::string& key)
{
Def const& def = this->GetInternal(key);
return def.Exists? def.c_str() : 0;
}
//----------------------------------------------------------------------------
-const char* cmDefinitions::Set(const char* key, const char* value)
+const char* cmDefinitions::Set(const std::string& key, const char* value)
{
Def const& def = this->SetInternal(key, Def(value));
return def.Exists? def.c_str() : 0;