diff options
Diffstat (limited to '')
-rw-r--r-- | src/StringUtils.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/StringUtils.h b/src/StringUtils.h index e2be2b9c0..620323e70 100644 --- a/src/StringUtils.h +++ b/src/StringUtils.h @@ -220,10 +220,10 @@ bool StringToInteger(const AString & a_str, T & a_Num) -/** Returns an integer from a key-value string map. -Returns a_Default if the key is not present or the value is not an int. */ +/** Returns a number (of any integer type T) from a key-value string map. +Returns a_Default if the key is not present or the value is not a number representable in type T. */ template <typename T> -int GetStringMapInteger(const AStringMap & a_Map, const AString & a_Key, T a_Default) +T GetStringMapInteger(const AStringMap & a_Map, const AString & a_Key, T a_Default) { // Try to locate the key: auto itr = a_Map.find(a_Key); |