summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2017-02-13 18:08:27 +0100
committerGitHub <noreply@github.com>2017-02-13 18:08:27 +0100
commit7b8380c6df0d532419bee86009fbd3d77b0a818f (patch)
treede5267740459c2b9b6b6a1296e9d43eb7ac8ec28 /src/StringUtils.h
parentMade survival the default gamemode (#3563) (diff)
parentPieceGenerator: Added rotation-aware vertical connectors. (diff)
downloadcuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar
cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.gz
cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.bz2
cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.lz
cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.xz
cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.zst
cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.zip
Diffstat (limited to 'src/StringUtils.h')
-rw-r--r--src/StringUtils.h6
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);