summaryrefslogtreecommitdiff
path: root/src/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'src/utilities')
-rw-r--r--src/utilities/android.hpp7
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;