mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Fix no check macros (#1244)
This commit is contained in:
parent
558c04b0a0
commit
819d813a12
@ -305,9 +305,9 @@ namespace etl
|
||||
#define ETL_ASSERT_OR_RETURN(b, e) static_cast<void>(sizeof(b)) // Does nothing.
|
||||
#define ETL_ASSERT_OR_RETURN_VALUE(b, e, v) static_cast<void>(sizeof(b)) // Does nothing.
|
||||
|
||||
#define ETL_ASSERT_FAIL(e) static_cast<void>(sizeof(b)) // Does nothing.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) static_cast<void>(sizeof(b)) // Does nothing.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) static_cast<void>(sizeof(b)) // Does nothing.
|
||||
#define ETL_ASSERT_FAIL(e) ETL_DO_NOTHING // Does nothing.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) ETL_DO_NOTHING // Does nothing.
|
||||
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) ETL_DO_NOTHING // Does nothing.
|
||||
#elif defined(ETL_USE_ASSERT_FUNCTION)
|
||||
#define ETL_ASSERT(b, e) do {if (!(b)) ETL_UNLIKELY {etl::private_error_handler::assert_handler<0>::assert_function_ptr((e));}} while(false) // If the condition fails, calls the assert function
|
||||
#define ETL_ASSERT_OR_RETURN(b, e) do {if (!(b)) ETL_UNLIKELY {etl::private_error_handler::assert_handler<0>::assert_function_ptr((e)); return;}} while(false) // If the condition fails, calls the assert function and return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user