Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use empty() to check for container emptiness.
[simgrid.git] / examples / deprecated / java / app / bittorrent / Peer.java
index 83f36cc..3bd30bf 100644 (file)
@@ -395,7 +395,7 @@ public class Peer extends Process {
   // Update the list of current choked and unchoked peers, using the choke algorithm
   private void updateChokedPeers() {
     round = (round + 1) % 3;
-    if (peers.size() == 0) {
+    if (peers.isEmpty()) {
       return;
     }
     //remove a peer from the list