From 1709b48b6665d95883ddd24f393d0d5adab0fa74 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 23 Jan 2014 20:27:15 +0000 Subject: [PATCH] fix invariant check macro --- include/libtorrent/config.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index 41b25c1bd..4ff59bab8 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -580,7 +580,8 @@ inline int snprintf(char* buf, int len, char const* fmt, ...) #endif #endif // TORRENT_USE_ASSERTS -#if TORRENT_USE_ASSERTS && !defined TORRENT_DISABLE_INVARIANT_CHECKS +#if defined TORRENT_DEBUG && TORRENT_USE_ASSERTS \ + && !defined TORRENT_DISABLE_INVARIANT_CHECKS #define TORRENT_USE_INVARIANT_CHECKS 1 #else #define TORRENT_USE_INVARIANT_CHECKS 0