-/* Copyright (c) 2006-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
// 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