summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-30 12:21:39 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-30 12:21:39 +0200
commit80bd0a54579cbe5188d42bf8e1e51724d19a6fcf (patch)
tree39ded239dea2d76854283a47b3f29cc12b8801e1 /src/StringUtils.h
parentAdded speed entity effect. (diff)
parentcChunk: Fixed the Coords param. (diff)
downloadcuberite-80bd0a54579cbe5188d42bf8e1e51724d19a6fcf.tar
cuberite-80bd0a54579cbe5188d42bf8e1e51724d19a6fcf.tar.gz
cuberite-80bd0a54579cbe5188d42bf8e1e51724d19a6fcf.tar.bz2
cuberite-80bd0a54579cbe5188d42bf8e1e51724d19a6fcf.tar.lz
cuberite-80bd0a54579cbe5188d42bf8e1e51724d19a6fcf.tar.xz
cuberite-80bd0a54579cbe5188d42bf8e1e51724d19a6fcf.tar.zst
cuberite-80bd0a54579cbe5188d42bf8e1e51724d19a6fcf.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 4a4c267c7..72a90a8c2 100644
--- a/src/StringUtils.h
+++ b/src/StringUtils.h
@@ -101,7 +101,7 @@ extern void SetBEInt(char * a_Mem, Int32 a_Value);
/// Parses any integer type. Checks bounds and returns errors out of band.
template <class T>
-bool StringToInteger(const AString& a_str, T& a_Num)
+bool StringToInteger(const AString & a_str, T & a_Num)
{
size_t i = 0;
bool positive = true;
@@ -119,7 +119,7 @@ bool StringToInteger(const AString& a_str, T& a_Num)
{
for (size_t size = a_str.size(); i < size; i++)
{
- if ((a_str[i] <= '0') || (a_str[i] >= '9'))
+ if ((a_str[i] < '0') || (a_str[i] > '9'))
{
return false;
}
@@ -140,7 +140,7 @@ bool StringToInteger(const AString& a_str, T& a_Num)
{
for (size_t size = a_str.size(); i < size; i++)
{
- if ((a_str[i] <= '0') || (a_str[i] >= '9'))
+ if ((a_str[i] < '0') || (a_str[i] > '9'))
{
return false;
}