Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case s4u::Mailbox
[simgrid.git] / examples / s4u / app-bittorrent / s4u-peer.hpp
index 9d1e195..c099e9c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017. The SimGrid Team.
+/* Copyright (c) 2012-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@ public:
   bool choked_upload   = true;  // Indicates if the peer is choked for the current peer
   bool choked_download = true;  // Indicates if the peer has choked the current peer
 
-  explicit Connection(int id) : id(id), mailbox_(simgrid::s4u::Mailbox::byName(std::to_string(id))){};
+  explicit Connection(int id) : id(id), mailbox_(simgrid::s4u::Mailbox::by_name(std::to_string(id))){};
   ~Connection() = default;
   void addSpeedValue(double speed) { peer_speed = peer_speed * 0.6 + speed * 0.4; }
   bool hasPiece(unsigned int piece) { return bitfield & 1U << piece; }
@@ -50,6 +50,7 @@ class Peer {
 public:
   explicit Peer(std::vector<std::string> args);
   Peer(const Peer&) = delete;
+  Peer& operator=(const Peer&) = delete;
   ~Peer();
   void operator()();