Fix: Make Dictionary::Add() return the new key.

This commit is contained in:
Gunnar Beutner 2012-07-12 10:24:54 +02:00
parent ec1c95f9dd
commit ace116c732
1 changed files with 3 additions and 1 deletions

View File

@ -76,9 +76,10 @@ public:
* Adds an unnamed value to the dictionary.
*
* @param value The value.
* @returns The key that was used to add the new item.
*/
template<typename T>
void Add(const T& value)
string Add(const T& value)
{
Iterator it;
string key;
@ -93,6 +94,7 @@ public:
} while (it != m_Data.end());
Set(key, value);
return key;
}
bool Contains(const string& key) const;