Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove superfluous indirection.
[simgrid.git] / examples / s4u / app-bittorrent / s4u-bittorrent.hpp
index a3b296a..1094af5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014, 2016-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
@@ -44,7 +44,7 @@
 #define MESSAGE_CANCEL_SIZE 17
 
 /** Types of messages exchanged between two peers. */
-typedef enum {
+enum e_message_type {
   MESSAGE_HANDSHAKE,
   MESSAGE_CHOKE,
   MESSAGE_UNCHOKE,
@@ -55,7 +55,7 @@ typedef enum {
   MESSAGE_REQUEST,
   MESSAGE_PIECE,
   MESSAGE_CANCEL
-} e_message_type;
+};
 
 class Message {
 public:
@@ -92,7 +92,7 @@ public:
 
   explicit HostBittorrent(simgrid::s4u::Host* ptr) : host(ptr)
   {
-    std::string descr = std::string("RngSream<") + host->getCname() + ">";
+    std::string descr = std::string("RngSream<") + host->get_cname() + ">";
     stream_           = RngStream_CreateStream(descr.c_str());
   }