diff options
author | Ilya Zhuravlev <zhuravlevilya@ya.ru> | 2012-10-23 01:18:44 +0400 |
---|---|---|
committer | Sfan5 <sfan5@live.de> | 2013-09-09 22:50:50 +0200 |
commit | 58841ef12f6cba1bb622353c1fcaa0e3c6fb46c9 (patch) | |
tree | 6012bbb1905231025dff89aa73782a7c38666839 /src/util | |
parent | 71a8769bb5ded4acb3f9e5a8502bb8af277f824d (diff) | |
download | minetest-58841ef12f6cba1bb622353c1fcaa0e3c6fb46c9.tar.gz minetest-58841ef12f6cba1bb622353c1fcaa0e3c6fb46c9.tar.bz2 minetest-58841ef12f6cba1bb622353c1fcaa0e3c6fb46c9.zip |
Add dummy and LevelDB database backends
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/string.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/string.h b/src/util/string.h index 1cb4ae8d8..d9390e33c 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -163,6 +163,12 @@ inline s32 mystoi(const std::string &s, s32 min, s32 max) return i; } +inline s64 stoi64(const std::string &s) { + std::stringstream tmp(s); + long long t; + tmp >> t; + return t; +} // MSVC2010 includes it's own versions of these //#if !defined(_MSC_VER) || _MSC_VER < 1600 @@ -200,6 +206,12 @@ inline std::string itos(s32 i) return o.str(); } +inline std::string i64tos(s64 i) { + std::ostringstream o; + o<<i; + return o.str(); +} + inline std::string ftos(float f) { std::ostringstream o; |