X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/055cc7ebc4ef9ad41d6b9fd84ee8bc8616f19a7a..8579400ae5e0389b237a2b52e9ea62bebbe1f4d9:/examples/s4u/app-bittorrent/s4u_peer.hpp?ds=inline diff --git a/examples/s4u/app-bittorrent/s4u_peer.hpp b/examples/s4u/app-bittorrent/s4u_peer.hpp index c37eca901d..6e33e58858 100644 --- a/examples/s4u/app-bittorrent/s4u_peer.hpp +++ b/examples/s4u/app-bittorrent/s4u_peer.hpp @@ -61,11 +61,11 @@ public: void updateInterestedAfterReceive(); void updateChokedPeers(); - bool hasNotPiece(unsigned int piece) { return !(bitfield_ & 1U << piece); } + bool hasNotPiece(unsigned int piece) { return not(bitfield_ & 1U << piece); } bool hasCompletedPiece(unsigned int piece); unsigned int countPieces(unsigned int bitfield); /** Check that a piece is not currently being download by the peer. */ - bool isNotDownloadingPiece(unsigned int piece) { return !(current_pieces & 1U << piece); } + bool isNotDownloadingPiece(unsigned int piece) { return not(current_pieces & 1U << piece); } int partiallyDownloadedPiece(Connection* remote_peer); void updatePiecesCountFromBitfield(unsigned int bitfield); void removeCurrentPiece(Connection* remote_peer, unsigned int current_piece);