projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea3c653
)
put the wstring stoi too in the ignore-on-vc2010 #if
author
Perttu Ahola
<celeron55@gmail.com>
Thu, 19 May 2011 05:16:48 +0000
(08:16 +0300)
committer
Perttu Ahola
<celeron55@gmail.com>
Thu, 19 May 2011 05:16:48 +0000
(08:16 +0300)
src/utility.h
patch
|
blob
|
history
diff --git
a/src/utility.h
b/src/utility.h
index 28732a099f3a8cc77b6361530f4cde4ebe6d7d94..84838c0c74b7e0e55ae55799f934fea2a42a055a 100644
(file)
--- a/
src/utility.h
+++ b/
src/utility.h
@@
-809,6
+809,11
@@
inline s32 stoi(std::string s)
return atoi(s.c_str());
}
+inline s32 stoi(std::wstring s)
+{
+ return atoi(wide_to_narrow(s).c_str());
+}
+
inline float stof(std::string s)
{
float f;
@@
-819,11
+824,6
@@
inline float stof(std::string s)
#endif
-inline s32 stoi(std::wstring s)
-{
- return atoi(wide_to_narrow(s).c_str());
-}
-
inline std::string itos(s32 i)
{
std::ostringstream o;