diff --git a/CMakeLists.txt b/CMakeLists.txt index 445800d0d..ca186c850 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,7 +225,7 @@ if(APPLE_IOS) endif() if(APPLE_MACOS) - # Not supported by standard library of our current minimal target + # Not supported by standard library of our current minimal target - macOS 10.14 or newer required set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-aligned-allocation") endif() diff --git a/Global.h b/Global.h index b628116ef..0a10239c4 100644 --- a/Global.h +++ b/Global.h @@ -86,10 +86,6 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size."); # endif #endif -#ifdef VCMI_ANDROID -# define NO_STD_TOSTRING // android runtime (gnustl) currently doesn't support std::to_string, so we provide our impl in this case -#endif // VCMI_ANDROID - /* ---------------------------------------------------------------------------- */ /* A macro to force inlining some of our functions */ /* ---------------------------------------------------------------------------- */ @@ -143,16 +139,12 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size."); #define BOOST_THREAD_USE_DLL //for example VCAI::finish() may freeze on thread join after interrupt when linking this statically #define BOOST_BIND_NO_PLACEHOLDERS -#if defined(_MSC_VER) && (_MSC_VER == 1900 || _MSC_VER == 1910 || _MSC_VER == 1911) -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES //Variadic templates are buggy in VS2015 and VS2017, so turn this off to avoid compile errors -#endif #if BOOST_VERSION >= 106600 #define BOOST_ASIO_ENABLE_OLD_SERVICES #endif #include #include -#include #include #include #include @@ -174,7 +166,6 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size."); #include #include #include -#include #include #ifndef M_PI @@ -233,12 +224,12 @@ using TLockGuardRec = std::lock_guard; #else # define DLL_LINKAGE DLL_IMPORT #endif - -#define THROW_FORMAT(message, formatting_elems) throw std::runtime_error(boost::str(boost::format(message) % formatting_elems)) - -// old iOS SDKs compatibility -#ifdef VCMI_IOS -#include + +#define THROW_FORMAT(message, formatting_elems) throw std::runtime_error(boost::str(boost::format(message) % formatting_elems)) + +// old iOS SDKs compatibility +#ifdef VCMI_IOS +#include #ifndef __IPHONE_13_0 #define __IPHONE_13_0 130000 @@ -287,7 +278,6 @@ void inline handleException() namespace vstd { - // combine hashes. Present in boost but not in std template inline void hash_combine(std::size_t& seed, const T& v) @@ -457,14 +447,6 @@ namespace vstd } }; - // Assigns value a2 to a1. The point of time of the real operation can be controlled - // with the () operator. - template - assigner assigno(t1 &a1, const t2 &a2) - { - return assigner(a1,a2); - } - //deleted pointer and sets it to nullptr template void clear_pointer(T* &ptr) @@ -722,17 +704,3 @@ namespace vstd using vstd::operator-=; VCMI_LIB_NAMESPACE_END - - -#ifdef NO_STD_TOSTRING -namespace std -{ - template - inline std::string to_string(const T& value) - { - std::ostringstream ss; - ss << value; - return ss.str(); - } -} -#endif // NO_STD_TOSTRING