forked from premiere/premiere-libtorrent
Merge branch 'master' of https://github.com/arvidn/libtorrent
This commit is contained in:
commit
c4cf7ebae6
|
@ -68,7 +68,7 @@ namespace libtorrent { namespace aux {
|
|||
{ return get<bool>(m_bools, name, settings_pack::bool_type_base); }
|
||||
|
||||
session_settings();
|
||||
session_settings(settings_pack const&);
|
||||
explicit session_settings(settings_pack const&);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace libtorrent { namespace aux {
|
|||
transport const ssl;
|
||||
};
|
||||
|
||||
// sockets used for outoing utp connections
|
||||
// sockets used for outgoing utp connections
|
||||
struct TORRENT_EXTRA_EXPORT outgoing_sockets
|
||||
{
|
||||
// partitions sockets based on whether they match one of the given endpoints
|
||||
|
@ -94,7 +94,7 @@ namespace libtorrent { namespace aux {
|
|||
std::vector<std::shared_ptr<outgoing_udp_socket>> sockets;
|
||||
private:
|
||||
// round-robin index into sockets
|
||||
// one dimention for IPv4/IPv6 and a second for SSL/non-SSL
|
||||
// one dimension for IPv4/IPv6 and a second for SSL/non-SSL
|
||||
mutable std::array<std::array<std::uint8_t, 2>, 2> index = {{ {{0, 0}}, {{0, 0}} }};
|
||||
};
|
||||
|
||||
|
|
|
@ -134,4 +134,3 @@ struct is_error_condition_enum<libtorrent::gzip_errors::error_code_enum>
|
|||
} }
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/puff.hpp"
|
||||
#include "libtorrent/gzip.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace {
|
||||
|
@ -180,8 +179,7 @@ namespace {
|
|||
}
|
||||
} // anonymous namespace
|
||||
|
||||
TORRENT_EXTRA_EXPORT void inflate_gzip(
|
||||
span<char const> in
|
||||
void inflate_gzip(span<char const> in
|
||||
, std::vector<char>& buffer
|
||||
, int maximum_size
|
||||
, error_code& ec)
|
||||
|
@ -264,4 +262,3 @@ namespace {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -37,10 +37,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
namespace libtorrent {
|
||||
|
||||
stat_cache::stat_cache() {}
|
||||
stat_cache::stat_cache() = default;
|
||||
stat_cache::~stat_cache() = default;
|
||||
|
||||
void stat_cache::set_cache(file_index_t const i, std::int64_t size)
|
||||
void stat_cache::set_cache(file_index_t const i, std::int64_t const size)
|
||||
{
|
||||
if (i >= m_stat_cache.end_index())
|
||||
m_stat_cache.resize(static_cast<int>(i) + 1, not_in_cache);
|
||||
|
|
|
@ -152,7 +152,7 @@ namespace libtorrent { namespace aux {
|
|||
{
|
||||
file_bytes_left = bytes_left;
|
||||
if (file_offset + file_bytes_left > files.file_size(file_index))
|
||||
file_bytes_left = (std::max)(static_cast<int>(files.file_size(file_index) - file_offset), 0);
|
||||
file_bytes_left = std::max(static_cast<int>(files.file_size(file_index) - file_offset), 0);
|
||||
|
||||
// there are no bytes left in this file, move to the next one
|
||||
// this loop skips over empty files
|
||||
|
@ -168,7 +168,7 @@ namespace libtorrent { namespace aux {
|
|||
|
||||
file_bytes_left = bytes_left;
|
||||
if (file_offset + file_bytes_left > files.file_size(file_index))
|
||||
file_bytes_left = (std::max)(static_cast<int>(files.file_size(file_index) - file_offset), 0);
|
||||
file_bytes_left = std::max(static_cast<int>(files.file_size(file_index) - file_offset), 0);
|
||||
}
|
||||
|
||||
// make a copy of the iovec array that _just_ covers the next
|
||||
|
|
|
@ -34,11 +34,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "libtorrent/xml_parse.hpp"
|
||||
#include "libtorrent/string_util.hpp"
|
||||
#include "libtorrent/string_view.hpp"
|
||||
|
||||
namespace libtorrent {
|
||||
|
||||
TORRENT_EXTRA_EXPORT void xml_parse(string_view input
|
||||
void xml_parse(string_view input
|
||||
, std::function<void(int, string_view, string_view)> callback)
|
||||
{
|
||||
char const* p = input.data();
|
||||
|
|
Loading…
Reference in New Issue