Skip to content

Commit 712d213

Browse files
committed
Merge pull request #106754 from YYF233333/opt_errarray
Simplify implementation of `errarray`
2 parents 45fc515 + 3545e94 commit 712d213

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

core/object/class_db.h

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -531,24 +531,9 @@ class ClassDB {
531531

532532
#ifdef DEBUG_ENABLED
533533

534-
_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr) {
535-
}
536-
537-
_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr, const Error &p_err) {
538-
arr.push_back(p_err);
539-
}
540-
541-
template <typename... P>
542-
_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr, const Error &p_err, P... p_args) {
543-
arr.push_back(p_err);
544-
errarray_add_str(arr, p_args...);
545-
}
546-
547534
template <typename... P>
548535
_FORCE_INLINE_ Vector<Error> errarray(P... p_args) {
549-
Vector<Error> arr;
550-
errarray_add_str(arr, p_args...);
551-
return arr;
536+
return Vector<Error>({ p_args... });
552537
}
553538

554539
#define BIND_METHOD_ERR_RETURN_DOC(m_method, ...) \

0 commit comments

Comments
 (0)