diff options
author | Mattes D <github@xoft.cz> | 2017-02-13 16:50:35 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-02-13 16:50:35 +0100 |
commit | 585571d78ca9ff5e384cae8d006a391df0f17ff7 (patch) | |
tree | de5267740459c2b9b6b6a1296e9d43eb7ac8ec28 /src/StringUtils.h | |
parent | Made survival the default gamemode (#3563) (diff) | |
download | cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.gz cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.bz2 cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.lz cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.xz cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.zst cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.zip |
Diffstat (limited to 'src/StringUtils.h')
-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); |