minor lint oriented code refactor

This commit is contained in:
Alden Torres 2018-03-27 18:24:04 -04:00 committed by Arvid Norberg
parent 90e4cefa91
commit f963f2c726
4 changed files with 3 additions and 6 deletions

View File

@ -40,17 +40,16 @@ namespace libtorrent { namespace aux {
struct has_block
{
has_block(has_block const&) = default;
// explicitly disallow assignment, to silence msvc warning
has_block& operator=(has_block const&) = delete;
explicit has_block(piece_block const& b): block(b) {}
bool operator()(pending_block const& pb) const
{ return pb.block == block; }
private:
piece_block const& block;
// explicitly disallow assignment, to silence msvc warning
has_block& operator=(has_block const&);
};
}}
#endif

View File

@ -54,4 +54,3 @@ namespace libtorrent {
}
#endif

View File

@ -227,7 +227,7 @@ namespace libtorrent {
// posix version
struct stat ret;
struct stat ret{};
int retval;
if (flags & dont_follow_links)
retval = ::lstat(f.c_str(), &ret);

View File

@ -35,7 +35,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/torrent.hpp"
#include "libtorrent/aux_/socket_type.hpp"
#include "libtorrent/peer_info.hpp" // for peer_info flags
#include "libtorrent/performance_counters.hpp" // for counters
#include "libtorrent/request_blocks.hpp"
#include "libtorrent/alert_manager.hpp"
#include "libtorrent/aux_/has_block.hpp"