forked from premiere/premiere-libtorrent
reduce some warnings
This commit is contained in:
parent
5efd0a9c20
commit
9a461c5e46
|
@ -55,25 +55,6 @@ namespace libtorrent
|
|||
public:
|
||||
enum { history = 5 };
|
||||
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
|
||||
#define PRINT_SIZEOF(x) l << "sizeof(" #x "): " << sizeof(x) << "\n";
|
||||
#define PRINT_OFFSETOF(x, y) l << " offsetof(" #x "," #y "): " << offsetof(x, y) << "\n";
|
||||
|
||||
static void print_size(logger& l)
|
||||
{
|
||||
PRINT_SIZEOF(stat_channel)
|
||||
PRINT_OFFSETOF(stat_channel, m_rate_history)
|
||||
PRINT_OFFSETOF(stat_channel, m_window)
|
||||
PRINT_OFFSETOF(stat_channel, m_counter)
|
||||
PRINT_OFFSETOF(stat_channel, m_total_counter)
|
||||
PRINT_OFFSETOF(stat_channel, m_rate_sum)
|
||||
}
|
||||
#undef PRINT_SIZEOF
|
||||
#undef PRINT_OFFSETOF
|
||||
|
||||
#endif
|
||||
|
||||
stat_channel()
|
||||
: m_window(3)
|
||||
, m_counter(0)
|
||||
|
|
|
@ -77,12 +77,18 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/peer_info.hpp"
|
||||
#include "libtorrent/settings.hpp"
|
||||
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
#endif
|
||||
|
||||
#ifndef TORRENT_WINDOWS
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
|
||||
// for logging stat layout
|
||||
#include "libtorrent/stat.hpp"
|
||||
|
||||
// for logging the size of DHT structures
|
||||
#ifndef TORRENT_DISABLE_DHT
|
||||
#include <libtorrent/kademlia/find_data.hpp>
|
||||
|
@ -618,7 +624,14 @@ namespace aux {
|
|||
PRINT_SIZEOF(stat)
|
||||
PRINT_SIZEOF(bandwidth_channel)
|
||||
PRINT_SIZEOF(policy)
|
||||
stat_channel::print_size(*m_logger);
|
||||
|
||||
PRINT_SIZEOF(stat_channel)
|
||||
PRINT_OFFSETOF(stat_channel, m_rate_history)
|
||||
PRINT_OFFSETOF(stat_channel, m_window)
|
||||
PRINT_OFFSETOF(stat_channel, m_counter)
|
||||
PRINT_OFFSETOF(stat_channel, m_total_counter)
|
||||
PRINT_OFFSETOF(stat_channel, m_rate_sum)
|
||||
|
||||
torrent::print_size(*m_logger);
|
||||
|
||||
PRINT_SIZEOF(peer_connection)
|
||||
|
|
Loading…
Reference in New Issue