Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
EngaugeAssert.h
1 #ifndef ENGAUGE_ASSERT_H
2 #define ENGAUGE_ASSERT_H
3 
4 #include "LoggerUpload.h"
5 #include <QtGlobal>
6 
7 // For the replacements below, the qt_noop part prevents 'missing return' compiler warnings at the ends of functions
8 inline void engauge_noop(bool) {}
9 
11 #if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
12 #define ENGAUGE_ASSERT(cond) engauge_noop(cond)
13 #else
14 #define ENGAUGE_ASSERT(cond) ((!(cond)) ? LoggerUpload::loggerAssert(#cond,__FILE__,__LINE__) : engauge_noop(cond))
15 #endif
16 
18 #if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
19 #define ENGAUGE_CHECK_PTR(ptr) engauge_noop((ptr)==0)
20 #else
21 #define ENGAUGE_CHECK_PTR(ptr) (((ptr)==0) ? LoggerUpload::loggerCheckPtr(#ptr,__FILE__,__LINE__) : engauge_noop((ptr)==0))
22 #endif
23 
24 #endif // ENGAUGE_ASSERT_H