X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/13fb4af932a02ea0bd4293d1e55ac071de326f80..48eb2f1b9262fc74f527816c348ed2aa6efa9f65:/include/xbt/exception.hpp diff --git a/include/xbt/exception.hpp b/include/xbt/exception.hpp index 511f47a3ac..7c826cd697 100644 --- a/include/xbt/exception.hpp +++ b/include/xbt/exception.hpp @@ -43,8 +43,7 @@ typedef std::vector Backtrace; class ThrowPoint { public: ThrowPoint() = default; - ThrowPoint(const char* file, int line, const char* function) : - file(file), line(line), function(function) {} + explicit ThrowPoint(const char* file, int line, const char* function) : file(file), line(line), function(function) {} const char* file = nullptr; int line = 0; const char* function = nullptr; @@ -73,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 @@ -117,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