Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add 'explicit'.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 7 Mar 2021 14:36:25 +0000 (15:36 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 8 Mar 2021 21:17:50 +0000 (22:17 +0100)
include/simgrid/kernel/resource/Resource.hpp
src/surf/network_interface.hpp

index 9be92f6..c377153 100644 (file)
@@ -36,7 +36,7 @@ protected:
   profile::Event* state_event_ = nullptr;
 
 public:
-  Resource(const std::string& name) : name_(name){};
+  explicit Resource(const std::string& name) : name_(name){};
   virtual ~Resource() = default;
   virtual void seal() { sealed_ = true; }
 
index 573b993..0ff7b13 100644 (file)
@@ -110,7 +110,7 @@ class LinkImpl : public Resource_T<LinkImpl>, public xbt::PropertyHolder {
   s4u::Link piface_;
 
 protected:
-  LinkImpl(const std::string& name);
+  explicit LinkImpl(const std::string& name);
   LinkImpl(const LinkImpl&) = delete;
   LinkImpl& operator=(const LinkImpl&) = delete;
   ~LinkImpl() override                 = default; // Use destroy() instead of this destructor.