summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2016-11-07 23:15:07 +0100
committerAlexander Harkness <me@bearbin.net>2016-12-12 15:32:32 +0100
commit8c6d0b51c719e1817e308375d129b17ede3b82fc (patch)
tree8aa23d1db5e4198f6aeed5091ad6adedc12fea35 /src/main.cpp
parentMerge pull request #3476 from Seadragon91/patch-1 (diff)
downloadcuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.gz
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.bz2
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.lz
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.xz
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.zst
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.zip
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6061602d7..83056bf61 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -8,6 +8,20 @@
#include <csignal>
#include <stdlib.h>
+#ifdef ANDROID
+ // Workaround for Android NDK builds that do not support std::to_string
+ namespace std
+ {
+ template <typename T>
+ std::string to_string(T Value)
+ {
+ std::ostringstream TempStream;
+ TempStream << Value;
+ return TempStream.str();
+ }
+ }
+#endif
+
#ifdef _MSC_VER
#include <dbghelp.h>
#endif // _MSC_VER
@@ -223,14 +237,11 @@ static void UniversalMain(std::unique_ptr<cSettingsRepositoryInterface> a_Overri
// Initialize LibEvent:
cNetworkSingleton::Get().Initialise();
- #if !defined(ANDROID_NDK)
try
- #endif
{
cRoot Root;
Root.Start(std::move(a_OverridesRepo));
}
- #if !defined(ANDROID_NDK)
catch (std::exception & e)
{
LOGERROR("Standard exception: %s", e.what());
@@ -239,7 +250,6 @@ static void UniversalMain(std::unique_ptr<cSettingsRepositoryInterface> a_Overri
{
LOGERROR("Unknown exception!");
}
- #endif
// Shutdown all of LibEvent:
cNetworkSingleton::Get().Terminate();