fix asserts=off build

This commit is contained in:
Arvid Norberg 2015-04-19 13:18:54 +00:00
parent 21751347bc
commit bf32895de9
5 changed files with 17 additions and 12 deletions

View File

@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
#if (defined TORRENT_DEBUG && TORRENT_USE_ASSERTS) \
|| defined TORRENT_ASIO_DEBUGGING \
|| defined TORRENT_PROFILE_CALLS \
|| TORRENT_RELEASE_ASSERTS \
|| defined TORRENT_RELEASE_ASSERTS \
|| defined TORRENT_DEBUG_BUFFERS
#include <string>

View File

@ -639,14 +639,14 @@ int snprintf(char* buf, int len, char const* fmt, ...)
// builds have asserts if they are explicitly enabled by
// the release_asserts macro.
#ifndef TORRENT_USE_ASSERTS
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
#if defined TORRENT_DEBUG || defined TORRENT_RELEASE_ASSERTS
#define TORRENT_USE_ASSERTS 1
#else
#define TORRENT_USE_ASSERTS 0
#endif
#endif // TORRENT_USE_ASSERTS
#if defined TORRENT_DEBUG && defined TORRENT_USE_ASSERTS \
#if defined TORRENT_DEBUG && TORRENT_USE_ASSERTS \
&& !defined TORRENT_DISABLE_INVARIANT_CHECKS
#define TORRENT_USE_INVARIANT_CHECKS 1
#else

View File

@ -33,10 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef TORRENT_PEER_CONNECTION_HPP_INCLUDED
#define TORRENT_PEER_CONNECTION_HPP_INCLUDED
#include <ctime>
#include <algorithm>
#include <vector>
#include <string>
#include "libtorrent/config.hpp"
#ifndef TORRENT_DISABLE_LOGGING
#include "libtorrent/debug.hpp"
@ -44,6 +41,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include "aux_/disable_warnings_push.hpp"
#include <ctime>
#include <algorithm>
#include <vector>
#include <string>
#include <boost/smart_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/noncopyable.hpp>
@ -61,7 +63,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/alert.hpp"
#include "libtorrent/peer_request.hpp"
#include "libtorrent/piece_block_progress.hpp"
#include "libtorrent/config.hpp"
#include "libtorrent/bandwidth_limit.hpp"
#include "libtorrent/socket_type_fwd.hpp"
#include "libtorrent/assert.hpp"

View File

@ -40,7 +40,7 @@ POSSIBILITY OF SUCH DAMAGE.
#if (defined TORRENT_DEBUG && TORRENT_USE_ASSERTS) \
|| defined TORRENT_ASIO_DEBUGGING \
|| defined TORRENT_PROFILE_CALLS \
|| TORRENT_RELEASE_ASSERTS \
|| defined TORRENT_RELEASE_ASSERTS \
|| defined TORRENT_DEBUG_BUFFERS
#ifdef __APPLE__
@ -296,9 +296,9 @@ TORRENT_NO_RETURN TORRENT_EXPORT void assert_fail(char const* expr, int line
#else
TORRENT_EXPORT void assert_print(char const* fmt, ...) {}
TORRENT_EXPORT void assert_fail(char const* expr, int line, char const* file
, char const* function, char const* value, int kind) {}
TORRENT_EXPORT void assert_print(char const*, ...) {}
TORRENT_NO_RETURN TORRENT_EXPORT void assert_fail(char const*, int, char const*
, char const*, char const*, int) {}
#endif

View File

@ -41,6 +41,8 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent
{
namespace {
bool supports_sse42()
{
#if TORRENT_HAS_SSE
@ -54,6 +56,8 @@ namespace libtorrent
static bool sse42_support = supports_sse42();
} // anonymous namespace
boost::uint32_t crc32c_32(boost::uint32_t v)
{
#if TORRENT_HAS_SSE