summaryrefslogtreecommitdiffstats
path: root/src/libavoid/assertions.h
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-07-01 17:13:58 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-07-01 17:13:58 +0000
commitf19bf822a0c2a44ff6201e7d24c4646e2e98e4ed (patch)
tree5459b5d6238a6788582d1fe944dedb300f0ee5d9 /src/libavoid/assertions.h
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
downloadinkscape-f19bf822a0c2a44ff6201e7d24c4646e2e98e4ed.tar.gz
inkscape-f19bf822a0c2a44ff6201e7d24c4646e2e98e4ed.zip
Merge branch 'master' of gitlab.com:Frigory33/inkscape
Diffstat (limited to 'src/libavoid/assertions.h')
-rw-r--r--src/libavoid/assertions.h15
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"