Ticket #52476: patch-extra-clang.diff

File patch-extra-clang.diff, 4.3 KB (added by 3add3287 (3add3287), 8 years ago)
  • src/data/memory_chunk.cc

     
    5454
    5555namespace torrent {
    5656
     57const int MemoryChunk::prot_exec;
     58const int MemoryChunk::prot_read;
     59const int MemoryChunk::prot_write;
     60const int MemoryChunk::prot_none;
     61const int MemoryChunk::map_shared;
     62
     63const int MemoryChunk::advice_normal;
     64const int MemoryChunk::advice_random;
     65const int MemoryChunk::advice_sequential;
     66const int MemoryChunk::advice_willneed;
     67const int MemoryChunk::advice_dontneed;
     68
     69const int MemoryChunk::sync_sync;
     70const int MemoryChunk::sync_async;
     71const int MemoryChunk::sync_invalidate;
     72
    5773uint32_t MemoryChunk::m_pagesize = getpagesize();
    5874
    5975inline void
  • src/protocol/request_list.cc

     
    5252
    5353namespace torrent {
    5454
     55const int request_list_constants::bucket_count;
     56
    5557const instrumentation_enum request_list_constants::instrumentation_added[bucket_count] = {
    5658  INSTRUMENTATION_TRANSFER_REQUESTS_QUEUED_ADDED,
    5759  INSTRUMENTATION_TRANSFER_REQUESTS_UNORDERED_ADDED,
  • src/torrent/data/file.cc

     
    5050
    5151namespace torrent {
    5252
     53const int File::flag_active;
     54const int File::flag_create_queued;
     55const int File::flag_resize_queued;
     56const int File::flag_fallocate;
     57const int File::flag_previously_created;
     58
     59const int File::flag_prioritize_first;
     60const int File::flag_prioritize_last;
     61
    5362File::File() :
    5463  m_fd(-1),
    5564  m_protection(0),
  • src/torrent/download.cc

     
    7272
    7373namespace torrent {
    7474
     75const int DownloadInfo::flag_open;
     76const int DownloadInfo::flag_active;
     77const int DownloadInfo::flag_compact;
     78const int DownloadInfo::flag_accepting_new_peers;
     79const int DownloadInfo::flag_accepting_seeders;
     80const int DownloadInfo::flag_private;
     81const int DownloadInfo::flag_meta_download;
     82const int DownloadInfo::flag_pex_enabled;
     83const int DownloadInfo::flag_pex_active;
     84
     85const int DownloadInfo::public_flags;
     86
     87const uint32_t DownloadInfo::unlimited;
     88
    7589const DownloadInfo* Download::info() const { return m_ptr->info(); }
    7690const download_data* Download::data() const { return m_ptr->data(); }
    7791
  • src/torrent/peer/connection_list.cc

     
    6060
    6161namespace torrent {
    6262
     63const int ConnectionList::disconnect_available;
     64const int ConnectionList::disconnect_quick;
     65const int ConnectionList::disconnect_unwanted;
     66const int ConnectionList::disconnect_delayed;
     67
    6368ConnectionList::ConnectionList(DownloadMain* download) :
    6469  m_download(download), m_minSize(50), m_maxSize(100) {
    6570}
  • src/torrent/utils/log.cc

     
    189189  pthread_mutex_lock(&log_mutex);
    190190  std::for_each(m_first, m_last, std::tr1::bind(&log_slot::operator(),
    191191                                                std::tr1::placeholders::_1,
    192                                                 buffer,
     192                                                (const char*)buffer,
    193193                                                std::distance(buffer, first),
    194194                                                std::distance(log_groups.begin(), this)));
    195195  if (dump_data != NULL)
  • src/utils/instrumentation.h

     
    3939
    4040#include <tr1/array>
    4141
     42#include <algorithm>
     43
    4244#include "torrent/common.h"
    4345#include "torrent/utils/log.h"
    4446
     
    118120
    119121inline void
    120122instrumentation_initialize() {
    121   instrumentation_values.assign(int64_t());
     123  std::fill(instrumentation_values.begin(), instrumentation_values.end(), int64_t());
    122124}
    123125
    124126inline void
  • src/utils/queue_buckets.h

     
    251251  instrumentation_update(constants::instrumentation_total[idx], -difference);
    252252
    253253  // Consider moving these to a temporary dequeue before releasing:
    254   std::for_each(begin, end, std::tr1::function<void (value_type)>(&constants::template destroy<value_type>));
     254  std::for_each(begin, end, std::tr1::function<void (value_type&)>(&constants::template destroy<value_type>));
    255255  queue_at(idx).erase(begin, end);
    256256}
    257257
  • src/torrent/download_info.h

     
    5252
    5353// This will become a Download 'handle' of kinds.
    5454
    55 class DownloadInfo {
     55class LIBTORRENT_EXPORT DownloadInfo {
    5656public:
    5757  typedef std::tr1::function<uint64_t ()>                              slot_stat_type;
    5858