diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2017-11-22 23:08:06 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2018-01-18 14:44:25 +0100 |
commit | 4082a18406c18af7b4fcef7bd501c3679c3be56b (patch) | |
tree | 761952db6eea1fc3fab672a8d739562eaf1fb031 /include/android | |
parent | 0e8d0fe001ceecea95ad7115b835527e13252a17 (diff) |
android: use unified headers and llvm-c++ STL (x86) with NDK 16
gnustl (and others) are to be removed in future versions of the ndk
also bump gradle and build-tools to current versions along with it
arm unfortunately crashes with llvm-c++, so keep with gnustl for now/fix
that later
Change-Id: Ic794c3293b599b77ec48096bf3283a99c09cbb79
Reviewed-on: https://gerrit.libreoffice.org/45163
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'include/android')
-rw-r--r-- | include/android/compatibility.hxx | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/include/android/compatibility.hxx b/include/android/compatibility.hxx index 0926358caf6f..27c99f4f2604 100644 --- a/include/android/compatibility.hxx +++ b/include/android/compatibility.hxx @@ -19,47 +19,25 @@ #include <math.h> -#if defined(ANDROID) +#if defined(ANDROID) && defined(ARM) #include <string> #include <sstream> namespace std { +inline double fmax(double x, double y) { return ::fmax(x, y); } -inline double fmax(double x, double y) -{ - return ::fmax(x, y); -} - -inline long stol( const std::string& str, std::size_t* /*pos*/ = 0, int base = 10 ) +inline long stol(const std::string& str, std::size_t* /*pos*/ = 0, int base = 10) { char* end; return strtol(str.c_str(), &end, base); } -template<typename T> -T round(T x) -{ - return ::round(x); -} - -template<typename T> -T trunc(T x) -{ - return ::trunc(x); -} +template <typename T> T round(T x) { return ::round(x); } -template<typename T> -T lround(T x) -{ - return ::lround(x); -} +template <typename T> T trunc(T x) { return ::trunc(x); } -template<typename T> -T copysign(T x, T y) -{ - return ::copysign(x, y); -} +template <typename T> T lround(T x) { return ::lround(x); } template <typename T> std::string to_string(const T& rNumber) { |