From 319762f15075b7c80812b578a0da613cf867b9f2 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sun, 29 Oct 2017 12:07:07 +0100 Subject: Added Android support using the GNU C++ STL library and the GCC toolchain --- src/utilities/android.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/utilities') diff --git a/src/utilities/android.hpp b/src/utilities/android.hpp index c14f92f3..64e9b3f4 100644 --- a/src/utilities/android.hpp +++ b/src/utilities/android.hpp @@ -7,7 +7,8 @@ // Author(s): // Cedric Nugteren // -// This file provides macro's and definitions to make compilation work for Android. +// This file provides macro's and definitions to make compilation work for Android. Note that this +// header should only be included when compiling for Android, e.g. when __ANDROID__ is defined. // // ================================================================================================= @@ -22,7 +23,7 @@ namespace std { -// No support for these standard library functions when compiling with 'gnustl_cpp' +// No support for these standard library functions when compiling with the GNU C++ STL template std::string to_string(T value) { std::ostringstream os; @@ -30,7 +31,7 @@ std::string to_string(T value) { return os.str(); } inline double stod(const std::string& value) { - return -1.0; // Not implemented + return std::atof(value.c_str()); } inline int stoi( const std::string& str, std::size_t* pos = 0, int base = 10) { char * p_end; -- cgit v1.2.3