From 26e9145c26e6a6c2794300a4a7cf5b19e8b6be37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 23 Sep 2022 14:49:11 +0200 Subject: SCons: Cleanup `DEBUG`, `_DEBUG` and `NDEBUG` defines - `_DEBUG` is MSVC specific so it didn't make much sense to define for Android and iOS builds. - iOS was the only platform to define `DEBUG`. We don't use it anywhere outside thirdparty code, which we usually don't intend to debug, so it seems better to be consistent with other platforms. - Consistently define `NDEBUG` to disable assert behavior in both `release` and `release_debug` targets. This used to be set for `release` for all platforms, and `release_debug` for Android and iOS only. - Due to the above, I removed the only use we made of `assert()` in Godot code, which was only implemented for Unix anyway, should have been `DEV_ENABLED`, and is in PoolAllocator which we don't actually use. - The denoise and recast modules keep defining `NDEBUG` even for the `debug` target as we don't want OIDN and Embree asserting all over the place. --- drivers/unix/os_unix.cpp | 5 ----- drivers/unix/os_unix.h | 1 - 2 files changed, 6 deletions(-) (limited to 'drivers/unix') diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index ab298a0e49..c8a42e925e 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -51,7 +51,6 @@ #include #endif -#include #include #include #include @@ -104,10 +103,6 @@ static void _setup_clock() { } #endif -void OS_Unix::debug_break() { - assert(false); -} - static void handle_interrupt(int sig) { if (!EngineDebugger::is_active()) { return; diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 8ef650f28b..b35f161524 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -86,7 +86,6 @@ public: virtual int get_processor_count() const override; - virtual void debug_break() override; virtual void initialize_debugging() override; virtual String get_executable_path() const override; -- cgit v1.2.3