#1260 Use std::abort instead of assert for release asserts

This commit is contained in:
Magne Sjaastad 2017-03-10 14:28:22 +01:00
parent db56dd4bc9
commit c3bf064661

View File

@ -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)