Engauge Digitizer 2
Loading...
Searching...
No Matches
EngaugeAssert.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef ENGAUGE_ASSERT_H
8#define ENGAUGE_ASSERT_H
9
10#include "LoggerUpload.h"
11#include <QtGlobal>
12
13// For the replacements below, the qt_noop part prevents 'missing return' compiler warnings at the ends of functions
14inline void engauge_noop(bool) {}
15
20#define ENGAUGE_ASSERT(cond) ((!(cond)) ? LoggerUpload::loggerAssert(#cond,__FILE__,__LINE__) : engauge_noop(cond))
22
27#define ENGAUGE_CHECK_PTR(ptr) (((ptr)==nullptr) ? LoggerUpload::loggerCheckPtr(#ptr,__FILE__,__LINE__) : engauge_noop((ptr)==nullptr))
29
30#endif // ENGAUGE_ASSERT_H
void engauge_noop(bool)