minor changes, typos and gcc tests in windows (#947)

minor changes, typos and gcc tests in windows
This commit is contained in:
Alden Torres 2016-07-25 17:58:00 -04:00 committed by Arvid Norberg
parent 7fdab0d9e9
commit 9af2072bc9
14 changed files with 23 additions and 34 deletions

View File

@ -99,10 +99,8 @@ build_script:
test_script:
- cd %ROOT_DIRECTORY%\test
# mingw tests crash currently. needs resolving
- if not %compiler% == gcc (
b2.exe -l400 --hash warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared ssl=%ssl% crypto=%crypto% win-tests
)
- b2.exe -l400 --hash warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared ssl=%ssl% crypto=%crypto% win-tests
- cd %ROOT_DIRECTORY%\bindings\python
# we use 64 bit python build
- if defined python ( c:\Python35-x64\python.exe test.py )

View File

@ -122,7 +122,7 @@ namespace libtorrent
// adding up callbacks to this queue. Once the number
// of buffers in use drops below the low watermark,
// we start calling these functions back
std::vector<boost::weak_ptr<disk_observer> > m_observers;
std::vector<boost::weak_ptr<disk_observer>> m_observers;
// callback used to tell the cache it needs to free up some blocks
boost::function<void()> m_trigger_cache_trim;
@ -192,4 +192,3 @@ namespace libtorrent
}
#endif // TORRENT_DISK_BUFFER_POOL_HPP

View File

@ -119,7 +119,7 @@ namespace libtorrent
entry(span<char const>);
template <typename U, typename = typename std::enable_if<
std::is_same<U, entry::string_type>::value
|| std::is_same<U, char const*>::value >::type>
|| std::is_same<U, char const*>::value>::type>
entry(U v)
: m_type(undefined_t)
{
@ -163,7 +163,7 @@ namespace libtorrent
entry& operator=(span<char const>);
template <typename U, typename = typename std::enable_if<
std::is_same<U, entry::string_type>::value
|| std::is_same<U, char const*>::value >::type>
|| std::is_same<U, char const*>::value>::type>
entry& operator=(U v)
{
destruct();
@ -327,4 +327,3 @@ namespace libtorrent
}
#endif // TORRENT_ENTRY_HPP_INCLUDED

View File

@ -49,4 +49,3 @@ namespace libtorrent
}
#endif

View File

@ -35,10 +35,11 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef TORRENT_DISABLE_EXTENSIONS
#include "libtorrent/config.hpp"
#include "libtorrent/aux_/disable_warnings_push.hpp"
#include <boost/shared_ptr.hpp>
#include "libtorrent/config.hpp"
#include "libtorrent/aux_/disable_warnings_pop.hpp"
@ -59,4 +60,3 @@ namespace libtorrent
#endif // TORRENT_DISABLE_EXTENSIONS
#endif // TORRENT_SMART_BAN_HPP_INCLUDED

View File

@ -62,4 +62,3 @@ namespace libtorrent
#endif // TORRENT_DISABLE_EXTENSIONS
#endif // TORRENT_UT_METADATA_HPP_INCLUDED

View File

@ -33,10 +33,9 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef TORRENT_UT_PEX_EXTENSION_HPP_INCLUDED
#define TORRENT_UT_PEX_EXTENSION_HPP_INCLUDED
#include "libtorrent/config.hpp"
#ifndef TORRENT_DISABLE_EXTENSIONS
#include "libtorrent/config.hpp"
#include "libtorrent/socket.hpp" // for endpoint
#include "libtorrent/aux_/disable_warnings_push.hpp"

View File

@ -870,7 +870,7 @@ namespace libtorrent
public:
#ifndef TORRENT_DISABLE_EXTENSIONS
typedef std::list<boost::shared_ptr<peer_plugin> > extension_list_t;
typedef std::list<boost::shared_ptr<peer_plugin>> extension_list_t;
extension_list_t m_extensions;
#endif
private:

View File

@ -50,7 +50,7 @@ namespace libtorrent
: m_ptr(v.data()), m_len(v.size()) {}
span(T& p) : m_ptr(&p), m_len(1) {}
span(T* p, size_t l) : m_ptr(p), m_len(l) {}
span(T* p, size_t const l) : m_ptr(p), m_len(l) {}
template <typename U, size_t N>
span(std::array<U, N>& arr)
@ -98,7 +98,7 @@ namespace libtorrent
return { data() + offset, size() - offset };
}
span<T> subspan(size_t const offset, size_t count) const
span<T> subspan(size_t const offset, size_t const count) const
{
TORRENT_ASSERT(size() >= offset);
TORRENT_ASSERT(size() >= offset + count);

View File

@ -1199,13 +1199,13 @@ namespace libtorrent
void setup_peer_class();
// The list of web seeds in this torrent. Seeds with fatal errors are
// removed from the set. It's important that iteratores are not
// removed from the set. It's important that iterators are not
// invalidated as entries are added and removed from this list, hence the
// std::list
std::list<web_seed_t> m_web_seeds;
#ifndef TORRENT_DISABLE_EXTENSIONS
std::list<boost::shared_ptr<torrent_plugin> > m_extensions;
std::list<boost::shared_ptr<torrent_plugin>> m_extensions;
#endif
// used for tracker announces
@ -1414,11 +1414,11 @@ namespace libtorrent
// if we're currently in upload-mode
std::uint16_t m_upload_mode_time;
// true when this torrent should anncounce to
// true when this torrent should announce to
// trackers
bool m_announce_to_trackers:1;
// true when this torrent should anncounce to
// true when this torrent should announce to
// the local network
bool m_announce_to_lsd:1;

View File

@ -1463,7 +1463,6 @@ namespace libtorrent
else
{
#ifndef TORRENT_DISABLE_LOGGING
error_code ec;
static const char* hp_msg_name[] = {"rendezvous", "connect", "failed"};
peer_log(peer_log_alert::incoming_message, "HOLEPUNCH"
, "msg: %s from %s to: unknown address type"
@ -2741,7 +2740,7 @@ namespace libtorrent
wr_recv_buf.begin += 28;
const char sh_vc[] = {0,0,0,0, 0,0,0,0};
if (!std::equal(sh_vc, sh_vc+8, recv_buffer.begin + 20))
if (!std::equal(sh_vc, sh_vc + 8, recv_buffer.begin + 20))
{
disconnect(errors::invalid_encryption_constant, op_encryption, 2);
return;

View File

@ -899,4 +899,3 @@ void http_connection::rate_limit(int limit)
}
}

View File

@ -104,6 +104,10 @@ POSSIBILITY OF SUCH DAMAGE.
// TODO: factor out cache_status to its own header
#include "libtorrent/disk_io_thread.hpp" // for cache_status
#ifndef TORRENT_DISABLE_EXTENSIONS
#include "libtorrent/extensions/ut_pex.hpp" // for was_introduced_by
#endif
#ifndef TORRENT_DISABLE_LOGGING
#include "libtorrent/aux_/session_impl.hpp" // for tracker_logger
#endif
@ -162,11 +166,6 @@ namespace libtorrent
restart_request.length = -1;
}
#ifndef TORRENT_DISABLE_EXTENSIONS
// defined in ut_pex.cpp
bool was_introduced_by(peer_plugin const*, tcp::endpoint const&);
#endif
torrent_hot_members::torrent_hot_members(aux::session_interface& ses
, add_torrent_params const& p, int const block_size
, bool const session_paused)

View File

@ -626,7 +626,7 @@ namespace libtorrent { namespace
torrent& m_torrent;
peer_connection& m_pc;
ut_pex_plugin& m_tp;
// stores all peers this this peer is connected to. These lists
// stores all peers this peer is connected to. These lists
// are updated with each pex message and are limited in size
// to protect against malicious clients. These lists are also
// used for looking up which peer a peer that supports holepunch
@ -634,10 +634,10 @@ namespace libtorrent { namespace
// these are vectors to save memory and keep the items close
// together for performance. Inserting and removing is relatively
// cheap since the lists' size is limited
typedef std::vector<std::pair<address_v4::bytes_type, std::uint16_t> > peers4_t;
typedef std::vector<std::pair<address_v4::bytes_type, std::uint16_t>> peers4_t;
peers4_t m_peers;
#if TORRENT_USE_IPV6
typedef std::vector<std::pair<address_v6::bytes_type, std::uint16_t> > peers6_t;
typedef std::vector<std::pair<address_v6::bytes_type, std::uint16_t>> peers6_t;
peers6_t m_peers6;
#endif
// the last pex messages we received
@ -710,4 +710,3 @@ namespace libtorrent
}
#endif