Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove explicit conversion to std::string when it's not required.
[simgrid.git] / src / msg / msg_private.hpp
index d87469c..c2bf802 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2022. 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. */
@@ -49,7 +49,6 @@ public:
 
   Task(const Task&) = delete;
   Task& operator=(const Task&) = delete;
-  ~Task()                      = default;
 
   bool is_used() const { return is_used_; }
   bool is_parallel() const { return parallel_; }
@@ -58,7 +57,7 @@ public:
   void set_not_used() { this->is_used_ = false; }
   const std::string& get_name() const { return name_; }
   const char* get_cname() const { return name_.c_str(); }
-  void set_name(const char* new_name) { name_ = std::string(new_name); }
+  void set_name(const char* new_name) { name_ = new_name; }
   void set_tracing_category(const char* category) { tracing_category_ = category ? category : ""; }
   const std::string& get_tracing_category() const { return tracing_category_; }
   bool has_tracing_category() { return not tracing_category_.empty(); }