浏览代码

Merge pull request #106754 from YYF233333/opt_errarray

Simplify implementation of `errarray`
Thaddeus Crews 3 月之前
父节点
当前提交
712d213b2c
共有 1 个文件被更改,包括 1 次插入16 次删除
  1. 1 16
      core/object/class_db.h

+ 1 - 16
core/object/class_db.h

@@ -531,24 +531,9 @@ public:
 
 #ifdef DEBUG_ENABLED
 
-_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr) {
-}
-
-_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr, const Error &p_err) {
-	arr.push_back(p_err);
-}
-
-template <typename... P>
-_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr, const Error &p_err, P... p_args) {
-	arr.push_back(p_err);
-	errarray_add_str(arr, p_args...);
-}
-
 template <typename... P>
 _FORCE_INLINE_ Vector<Error> errarray(P... p_args) {
-	Vector<Error> arr;
-	errarray_add_str(arr, p_args...);
-	return arr;
+	return Vector<Error>({ p_args... });
 }
 
 #define BIND_METHOD_ERR_RETURN_DOC(m_method, ...) \