mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
#1260 Use std::abort instead of assert for release asserts
This commit is contained in:
parent
db56dd4bc9
commit
c3bf064661
@ -1,15 +1,15 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
#include <assert.h>
|
||||
#define NDEBUG
|
||||
#else
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#define CAF_ASSERT(expr) assert(expr)
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#define CAF_ASSERT(expr) \
|
||||
do \
|
||||
{ \
|
||||
if(!(expr)) \
|
||||
{ \
|
||||
std::cout << __FILE__ << ":" << __LINE__ << ": CAF_ASSERT(" \
|
||||
<< #expr << ") failed" << std::endl; \
|
||||
std::abort(); \
|
||||
} \
|
||||
} while(false)
|
||||
|
Loading…
Reference in New Issue
Block a user