diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-10-29 12:07:07 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-10-29 12:07:07 +0100 |
commit | 319762f15075b7c80812b578a0da613cf867b9f2 (patch) | |
tree | 8a1b354e25a5931326aecaadbaac7f705ba2a70a /src/utilities | |
parent | 12b08ae49154379f7471a40809ace6418857b387 (diff) |
Added Android support using the GNU C++ STL library and the GCC toolchain
Diffstat (limited to 'src/utilities')
-rw-r--r-- | src/utilities/android.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
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 <www.cedricnugteren.nl> // -// 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<typename T> 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; |