Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / src / instr / instr_private.hpp
index 40d2e07..c6b35da 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2023. 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. */
@@ -24,8 +24,7 @@
 #include <sstream>
 #include <string>
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 namespace paje {
 
 void dump_generator_version();
@@ -69,20 +68,20 @@ public:
 
 // NoOpTI: init, finalize, test, wait, barrier
 class NoOpTIData : public TIData {
-  explicit NoOpTIData(const std::string&, double); // disallow this constructor inherited from TIData
-
 public:
   using TIData::TIData;
+  explicit NoOpTIData(const std::string&, double) = delete; // disallow this constructor inherited from TIData
+
   std::string print() override { return get_name(); }
   std::string display_size() override { return "NA"; }
 };
 
 // CPuTI: compute, sleep (+ waitAny and waitall out of laziness)
 class CpuTIData : public TIData {
-  explicit CpuTIData(const std::string&); // disallow this constructor inherited from TIData
-
 public:
   using TIData::TIData;
+  explicit CpuTIData(const std::string&) = delete; // disallow this constructor inherited from TIData
+
   std::string print() override
   {
     std::stringstream stream;
@@ -205,7 +204,7 @@ class WaitTIData : public TIData {
   int tag_;
 
 public:
-  WaitTIData(std::string name, int src, int dest, int tag) : TIData(name), src_(src), dest_(dest), tag_(tag){};
+  WaitTIData(const std::string& name, int src, int dest, int tag) : TIData(name), src_(src), dest_(dest), tag_(tag){};
 
   std::string print() override
   {
@@ -230,8 +229,7 @@ public:
   }
   std::string display_size() override { return "NA"; }
 };
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
 
 XBT_PRIVATE std::string instr_pid(simgrid::s4u::Actor const& proc);