From 6027f9f20cdfac8cca58d7741065208a63746ac4 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 30 Nov 2008 04:50:52 +0000 Subject: [PATCH] made assert tied to the new TORRENT_DEBUG define. Fixed two include problems that surfaced as a result --- include/libtorrent/assert.hpp | 7 +++++++ include/libtorrent/lazy_entry.hpp | 1 + src/gzip.cpp | 1 + 3 files changed, 9 insertions(+) diff --git a/include/libtorrent/assert.hpp b/include/libtorrent/assert.hpp index 71a1aa406..0000b6d53 100644 --- a/include/libtorrent/assert.hpp +++ b/include/libtorrent/assert.hpp @@ -33,6 +33,11 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef TORRENT_ASSERT #include "libtorrent/config.hpp" + +#if !defined TORRENT_DEBUG +#define TORRENT_ASSERT(a) do {} while(false) +#else + #include #ifdef __GNUC__ @@ -51,3 +56,5 @@ TORRENT_EXPORT void assert_fail(const char* expr, int line, char const* file, ch #endif +#endif + diff --git a/include/libtorrent/lazy_entry.hpp b/include/libtorrent/lazy_entry.hpp index 547900c99..01d1ac3ca 100644 --- a/include/libtorrent/lazy_entry.hpp +++ b/include/libtorrent/lazy_entry.hpp @@ -38,6 +38,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/assert.hpp" #include "libtorrent/size_type.hpp" #include +#include namespace libtorrent { diff --git a/src/gzip.cpp b/src/gzip.cpp index 929816240..cf0c5b196 100644 --- a/src/gzip.cpp +++ b/src/gzip.cpp @@ -35,6 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "zlib.h" #include +#include namespace {