fix production asserts

This commit is contained in:
arvidn 2018-05-22 10:01:45 +02:00 committed by Arvid Norberg
parent 92a7188163
commit 55a0a6e0df
1 changed files with 6 additions and 5 deletions

View File

@ -285,11 +285,8 @@ TORRENT_EXPORT void print_backtrace(char* out, int len, int /*max_depth*/, void*
#endif
namespace libtorrent {
#if TORRENT_USE_ASSERTS || defined TORRENT_ASIO_DEBUGGING
#ifdef TORRENT_PRODUCTION_ASSERTS
#if (TORRENT_USE_ASSERTS || defined TORRENT_ASIO_DEBUGGING) && \
defined TORRENT_PRODUCTION_ASSERTS
char const* libtorrent_assert_log = "asserts.log";
namespace {
// the number of asserts we've printed to the log
@ -297,6 +294,10 @@ std::atomic<int> assert_counter(0);
}
#endif
namespace libtorrent {
#if TORRENT_USE_ASSERTS || defined TORRENT_ASIO_DEBUGGING
TORRENT_FORMAT(1,2)
TORRENT_EXPORT void assert_print(char const* fmt, ...)
{