-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Closed
Milestone
Description
--- to make it's precondition same as CV_DbgCheckXX. Or further, replace all #if defined _DEBUG with #if !defined NDEBUG.
The C++ standard only mentions NDEBUG as the condition of assert macro, no _DEBUG.
opencv/modules/core/include/opencv2/core/base.hpp
Lines 389 to 394 in e1fec15
| #if defined _DEBUG || defined CV_STATIC_ANALYSIS | |
| # define CV_DbgAssert(expr) CV_Assert(expr) | |
| #else | |
| /** replaced with CV_Assert(expr) in Debug configuration */ | |
| # define CV_DbgAssert(expr) | |
| #endif |
opencv/modules/core/include/opencv2/core/check.hpp
Lines 153 to 169 in e1fec15
| #ifndef NDEBUG | |
| #define CV_DbgCheck(v, test_expr, msg) CV__CHECK_CUSTOM_TEST(_, auto, v, (test_expr), #v, #test_expr, msg) | |
| #define CV_DbgCheckEQ(v1, v2, msg) CV__CHECK(_, EQ, auto, v1, v2, #v1, #v2, msg) | |
| #define CV_DbgCheckNE(v1, v2, msg) CV__CHECK(_, NE, auto, v1, v2, #v1, #v2, msg) | |
| #define CV_DbgCheckLE(v1, v2, msg) CV__CHECK(_, LE, auto, v1, v2, #v1, #v2, msg) | |
| #define CV_DbgCheckLT(v1, v2, msg) CV__CHECK(_, LT, auto, v1, v2, #v1, #v2, msg) | |
| #define CV_DbgCheckGE(v1, v2, msg) CV__CHECK(_, GE, auto, v1, v2, #v1, #v2, msg) | |
| #define CV_DbgCheckGT(v1, v2, msg) CV__CHECK(_, GT, auto, v1, v2, #v1, #v2, msg) | |
| #else | |
| #define CV_DbgCheck(v, test_expr, msg) do { } while (0) | |
| #define CV_DbgCheckEQ(v1, v2, msg) do { } while (0) | |
| #define CV_DbgCheckNE(v1, v2, msg) do { } while (0) | |
| #define CV_DbgCheckLE(v1, v2, msg) do { } while (0) | |
| #define CV_DbgCheckLT(v1, v2, msg) do { } while (0) | |
| #define CV_DbgCheckGE(v1, v2, msg) do { } while (0) | |
| #define CV_DbgCheckGT(v1, v2, msg) do { } while (0) | |
| #endif |
Reactions are currently unavailable