瀏覽代碼

Even simpler DeadlyErrorBase

Malcolm Tyrrell 5 年之前
父節點
當前提交
9b5e758bdd
共有 2 個文件被更改,包括 3 次插入10 次删除
  1. 1 5
      code/Common/Exceptional.cpp
  2. 2 5
      include/assimp/Exceptional.h

+ 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)...)
     {
     }