summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-05 21:49:04 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-06 12:12:22 +0300
commit2bd59adc7c456ce6f377feac8bc838e8011ebfc8 (patch)
treef2f25428e42e59b9a6d55d7c0be9a99c42e96e40 /src/utils/stringutils.cpp
parentac1ef6b19f5c1405cfaa239ab367a93b17043723 (diff)
downloadmanaplus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.gz
manaplus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.bz2
manaplus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.xz
manaplus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.zip
Fix code style.
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index c53d33884..7ad144331 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -23,6 +23,7 @@
#include "utils/stringutils.h"
#include <algorithm>
+#include <sstream>
#ifdef WIN32
#include <sys/time.h>
@@ -716,7 +717,7 @@ std::string toString(unsigned int num)
size_t idx = 28;
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
return buf + idx + 1;
}
@@ -727,7 +728,7 @@ std::string toString(unsigned long num)
size_t idx = 98;
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
return buf + idx + 1;
}
@@ -738,7 +739,7 @@ std::string toString(uint16_t num)
size_t idx = 8;
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
return buf + idx + 1;
}
@@ -749,7 +750,7 @@ std::string toString(unsigned char num)
size_t idx = 3;
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
return buf + idx + 1;
}
@@ -767,18 +768,18 @@ std::string toString(int num)
}
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
if (useSign)
buf[idx--] = '-';
return buf + idx + 1;
}
-std::string toString(float num)
+std::string toString(const float num)
{
return strprintf("%f", num);
}
-std::string toString(double num)
+std::string toString(const double num)
{
return strprintf("%f", static_cast<float>(num));
}