summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorRogier-5 <rogier777@gmail.com>2016-08-11 19:22:40 +0200
committerest31 <est31@users.noreply.github.com>2016-08-11 19:22:40 +0200
commitb11720af459d44a553cb5d23ef776a632fb30a65 (patch)
tree78618a26db2ee19e892961b73a26db66fd889e4e /src/client.cpp
parent35f47e5461042b3d190f8ea583aec2aa26f1c484 (diff)
downloadminetest-b11720af459d44a553cb5d23ef776a632fb30a65.tar.gz
minetest-b11720af459d44a553cb5d23ef776a632fb30a65.tar.bz2
minetest-b11720af459d44a553cb5d23ef776a632fb30a65.zip
Use the standard to_string() functions for C++11 (#4279)
If compiling according to a C++ version before C++11, then define std::to_string ourselves. Add a to_wstring version as well As std::to_string() for floating point types uses %.6f as floating point format converter, instead of %G, it needs special care. To preserve ftos() behavior (which is expected to use the %G format converter), it no longer uses to_string().
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 4ffcec6ba..483b22caa 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -820,7 +820,7 @@ void Client::initLocalMapSaving(const Address &address,
const std::string world_path = porting::path_user
+ DIR_DELIM + "worlds"
+ DIR_DELIM + "server_"
- + hostname + "_" + to_string(address.getPort());
+ + hostname + "_" + std::to_string(address.getPort());
fs::CreateAllDirs(world_path);