From b11720af459d44a553cb5d23ef776a632fb30a65 Mon Sep 17 00:00:00 2001 From: Rogier-5 Date: Thu, 11 Aug 2016 19:22:40 +0200 Subject: 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(). --- src/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client.cpp') 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); -- cgit v1.2.3