From 9b5e758bddcecab119a89344e65448cd8673636e Mon Sep 17 00:00:00 2001 From: Malcolm Tyrrell Date: Wed, 19 Aug 2020 17:59:13 +0100 Subject: [PATCH] Even simpler DeadlyErrorBase --- code/Common/Exceptional.cpp | 6 +----- include/assimp/Exceptional.h | 7 ++----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/code/Common/Exceptional.cpp b/code/Common/Exceptional.cpp index e3e3b535b..660b54b27 100644 --- a/code/Common/Exceptional.cpp +++ b/code/Common/Exceptional.cpp @@ -48,11 +48,7 @@ Implementations of the exception classes. #include #include -DeadlyErrorBase::DeadlyErrorBase(const std::string& errorText) - : runtime_error(errorText) -{} - DeadlyErrorBase::DeadlyErrorBase(Assimp::Formatter::format f) - : DeadlyErrorBase(std::string(f)) + : runtime_error(std::string(f)) { } diff --git a/include/assimp/Exceptional.h b/include/assimp/Exceptional.h index 139201085..0704d0bbc 100644 --- a/include/assimp/Exceptional.h +++ b/include/assimp/Exceptional.h @@ -58,13 +58,10 @@ using std::runtime_error; class ASSIMP_API DeadlyErrorBase : public runtime_error { protected: - /** Constructor with arguments */ - explicit DeadlyErrorBase(const std::string& errorText); - - explicit DeadlyErrorBase(Assimp::Formatter::format f); + DeadlyErrorBase(Assimp::Formatter::format f); template - explicit DeadlyErrorBase(Assimp::Formatter::format f, U&& u, T&&... args) + DeadlyErrorBase(Assimp::Formatter::format f, U&& u, T&&... args) : DeadlyErrorBase(std::move(f << std::forward(u)), std::forward(args)...) { }