diff options
| author | Sylvain Chiron <chironsylvain@orange.fr> | 2017-07-01 11:36:41 +0000 |
|---|---|---|
| committer | Sylvain Chiron <chironsylvain@orange.fr> | 2017-07-01 11:36:41 +0000 |
| commit | fd733201b82f39655488a286c89142f321ef9dc9 (patch) | |
| tree | a12c70f213414f69467f666619b1552103f6370e /src/libavoid/assertions.h | |
| parent | Hackfest icon work: restore selected menu icons and make theming easier (diff) | |
| download | inkscape-fd733201b82f39655488a286c89142f321ef9dc9.tar.gz inkscape-fd733201b82f39655488a286c89142f321ef9dc9.zip | |
Updated libs from the Adaptagrams project: libavoid, libcola and libvspc; changed the code to match the new API
Signed-off-by: Sylvain Chiron <chironsylvain@orange.fr>
Diffstat (limited to 'src/libavoid/assertions.h')
| -rw-r--r-- | src/libavoid/assertions.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/libavoid/assertions.h b/src/libavoid/assertions.h index 0725c4482..17156225a 100644 --- a/src/libavoid/assertions.h +++ b/src/libavoid/assertions.h @@ -19,19 +19,30 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * Author(s): Michael Wybrow <mjwybrow@users.sourceforge.net> + * Author(s): Michael Wybrow */ #ifndef AVOID_ASSERTIONS_H #define AVOID_ASSERTIONS_H +#define COLA_UNUSED(expr) do { (void)(expr); } while (0) + #ifdef NDEBUG #define COLA_ASSERT(expr) static_cast<void>(0) #else // Not NDEBUG - #if defined(USE_ASSERT_EXCEPTIONS) + #ifdef _MSC_VER + // Compiling with Microsoft Visual C++ compiler + + // Prevent inclusion of min and max macros. + #define NOMINMAX + + #include <afx.h> + #define COLA_ASSERT(expr) ASSERT(expr) + + #elif defined(USE_ASSERT_EXCEPTIONS) #include "libvpsc/assertions.h" |
