2
0
Эх сурвалжийг харах

Even simpler DeadlyErrorBase

Malcolm Tyrrell 5 жил өмнө
parent
commit
9b5e758bdd

+ 1 - 5
code/Common/Exceptional.cpp

@@ -48,11 +48,7 @@ Implementations of the exception classes.
 #include <assimp/Exceptional.h>
 #include <assimp/TinyFormatter.h>
 
-DeadlyErrorBase::DeadlyErrorBase(const std::string& errorText)
-    : runtime_error(errorText)
-{}
-
 DeadlyErrorBase::DeadlyErrorBase(Assimp::Formatter::format f)
-    : DeadlyErrorBase(std::string(f))
+    : runtime_error(std::string(f))
 {
 }

+ 2 - 5
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<typename... T, typename U>
-    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>(u)), std::forward<T>(args)...)
     {
     }