From: Perttu Ahola Date: Thu, 19 May 2011 05:16:48 +0000 (+0300) Subject: put the wstring stoi too in the ignore-on-vc2010 #if X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=889de3e93aadb5c79adb58953513cab3e6cd3a3d;p=zefram%2Fminetest%2Fminetest_engine.git put the wstring stoi too in the ignore-on-vc2010 #if --- diff --git a/src/utility.h b/src/utility.h index 28732a09..84838c0c 100644 --- 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;