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); }