mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
This PR will reduce the compile time of code using AppEnum. * AppEnum: Move QTextStream operator to avoid include of QTextStream * Avoid use of iostream in cafAssert rator to avoid include of QTextStream Include file profiling shows that include of QTextStream is a performance issue. Create a non-templated base class for AppEnum. Implement the QTextStream operator for this interface.
16 lines
835 B
C++
16 lines
835 B
C++
|
|
#pragma once
|
|
|
|
#include <cstdio>
|
|
#include <cstdlib>
|
|
|
|
#define CAF_ASSERT( expr ) \
|
|
do \
|
|
{ \
|
|
if ( !( expr ) ) /* NOLINT */ \
|
|
{ \
|
|
std::printf( "%s : %i : CAF_ASSERT( %s ) failed\n", __FILE__, __LINE__, #expr ); \
|
|
std::abort(); \
|
|
} \
|
|
} while ( false )
|