Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
be more explicit
[simgrid.git] / include / xbt / exception.hpp
index 6e80198..7c826cd 100644 (file)
@@ -72,16 +72,10 @@ public:
     procname_(xbt_procname()),
     pid_(xbt_getpid())
   {}
-  WithContextException(Backtrace bt) :
-    backtrace_(std::move(bt)),
-    procname_(xbt_procname()),
-    pid_(xbt_getpid())
+  explicit WithContextException(Backtrace bt) : backtrace_(std::move(bt)), procname_(xbt_procname()), pid_(xbt_getpid())
   {}
-  WithContextException(ThrowPoint throwpoint, Backtrace bt) :
-    backtrace_(std::move(bt)),
-    procname_(xbt_procname()),
-    pid_(xbt_getpid()),
-    throwpoint_(throwpoint)
+  explicit WithContextException(ThrowPoint throwpoint, Backtrace bt)
+      : backtrace_(std::move(bt)), procname_(xbt_procname()), pid_(xbt_getpid()), throwpoint_(throwpoint)
   {}
   virtual ~WithContextException();
   Backtrace const& backtrace() const
@@ -116,7 +110,7 @@ public:
   WithContext(E exception, WithContextException context) :
     E(std::move(exception)),
     WithContextException(std::move(context)) {}
-  ~WithContext() override {}
+  ~WithContext() override = default;
 };
 
 /** Throw a C++ exception with some context