From a4f8bd4ee075169c75c91c6e4e48f6ebb0b8c4c0 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 20 Jan 2019 00:07:58 -0500 Subject: [PATCH] Bump to C++17 --- native/jni/Application.mk | 2 +- native/jni/utils/new.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/native/jni/Application.mk b/native/jni/Application.mk index 8a75e4a5b..678fd35ea 100644 --- a/native/jni/Application.mk +++ b/native/jni/Application.mk @@ -1,7 +1,7 @@ APP_ABI := armeabi-v7a x86 APP_CFLAGS := -Oz -std=gnu11 \ -DMAGISK_VERSION="${MAGISK_VERSION}" -DMAGISK_VER_CODE=${MAGISK_VER_CODE} -APP_CPPFLAGS := -std=c++14 +APP_CPPFLAGS := -std=c++17 APP_STL := c++_static APP_PLATFORM := android-16 diff --git a/native/jni/utils/new.cpp b/native/jni/utils/new.cpp index daf4d0b67..a0b36b195 100644 --- a/native/jni/utils/new.cpp +++ b/native/jni/utils/new.cpp @@ -8,7 +8,7 @@ void* operator new(std::size_t s) { return malloc(s); } void* operator new[](std::size_t s) { return malloc(s); } void operator delete(void *p) { free(p); } void operator delete[](void *p) { free(p); } -void* operator new(std::size_t s, const std::nothrow_t&) { return malloc(s); } -void* operator new[](std::size_t s, const std::nothrow_t&) { return malloc(s); } -void operator delete(void *p, const std::nothrow_t&) { free(p); } -void operator delete[](void *p, const std::nothrow_t&) { free(p); } +void* operator new(std::size_t s, const std::nothrow_t&) noexcept { return malloc(s); } +void* operator new[](std::size_t s, const std::nothrow_t&) noexcept { return malloc(s); } +void operator delete(void *p, const std::nothrow_t&) noexcept { free(p); } +void operator delete[](void *p, const std::nothrow_t&) noexcept { free(p); }