From ace116c73288b965f979ed6eb9410d2cb2d906aa Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 12 Jul 2012 10:24:54 +0200 Subject: [PATCH] Fix: Make Dictionary::Add() return the new key. --- base/dictionary.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/dictionary.h b/base/dictionary.h index d6c7f490f..28736d013 100644 --- a/base/dictionary.h +++ b/base/dictionary.h @@ -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 - 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;