cmDefinitions: Remove unused Set return value.

This commit is contained in:
Stephen Kelly 2015-04-25 16:29:54 +02:00
parent b9f4dd39bb
commit 2337034442
2 changed files with 4 additions and 6 deletions

View File

@ -45,13 +45,12 @@ cmDefinitions::SetInternal(const std::string& key, Def const& def)
if(this->Up || def.Exists) if(this->Up || def.Exists)
{ {
// In lower scopes we store keys, defined or not. // In lower scopes we store keys, defined or not.
return (this->Map[key] = def); this->Map[key] = def;
} }
else else
{ {
// In the top-most scope we need not store undefined keys. // In the top-most scope we need not store undefined keys.
this->Map.erase(key); this->Map.erase(key);
return this->NoDef;
} }
} }
@ -63,10 +62,9 @@ const char* cmDefinitions::Get(const std::string& key)
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
const char* cmDefinitions::Set(const std::string& key, const char* value) void cmDefinitions::Set(const std::string& key, const char* value)
{ {
Def const& def = this->SetInternal(key, Def(value)); this->SetInternal(key, Def(value));
return def.Exists? def.c_str() : 0;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@ -38,7 +38,7 @@ public:
const char* Get(const std::string& key); const char* Get(const std::string& key);
/** Set (or unset if null) a value associated with a key. */ /** Set (or unset if null) a value associated with a key. */
const char* Set(const std::string& key, const char* value); void Set(const std::string& key, const char* value);
/** Get the set of all local keys. */ /** Get the set of all local keys. */
std::set<std::string> LocalKeys() const; std::set<std::string> LocalKeys() const;