summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.h
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
commit1e6f02437e88495d57249f742526526ee5865777 (patch)
treeaf200ec3c23c5d04359ba471d275cfa6d0a3c7fb /src/StringUtils.h
parentMerge pull request #2157 from beeduck/Issue2106 (diff)
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-1e6f02437e88495d57249f742526526ee5865777.tar
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.gz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.bz2
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.lz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.xz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.zst
cuberite-1e6f02437e88495d57249f742526526ee5865777.zip
Diffstat (limited to 'src/StringUtils.h')
-rw-r--r--src/StringUtils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StringUtils.h b/src/StringUtils.h
index b5fc58a2d..8f67d8031 100644
--- a/src/StringUtils.h
+++ b/src/StringUtils.h
@@ -158,7 +158,7 @@ bool StringToInteger(const AString & a_str, T & a_Num)
return false;
}
result *= 10;
- T digit = a_str[i] - '0';
+ T digit = static_cast<T>(a_str[i] - '0');
if (std::numeric_limits<T>::max() - digit < result)
{
return false;
@@ -179,7 +179,7 @@ bool StringToInteger(const AString & a_str, T & a_Num)
return false;
}
result *= 10;
- T digit = a_str[i] - '0';
+ T digit = static_cast<T>(a_str[i] - '0');
if (std::numeric_limits<T>::min() + digit > result)
{
return false;