Skip to content

Commit 8773f95

Browse files
committed
Optimize and simplify sarray.
1 parent 45fc515 commit 8773f95

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

core/string/ustring.h

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -793,22 +793,7 @@ _FORCE_INLINE_ String ETRN(const String &p_text, const String &p_text_plural, in
793793

794794
bool select_word(const String &p_s, int p_col, int &r_beg, int &r_end);
795795

796-
_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr) {
797-
}
798-
799-
_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr, const String &p_str) {
800-
arr.push_back(p_str);
801-
}
802-
803-
template <typename... P>
804-
_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr, const String &p_str, P... p_args) {
805-
arr.push_back(p_str);
806-
sarray_add_str(arr, p_args...);
807-
}
808-
809796
template <typename... P>
810797
_FORCE_INLINE_ Vector<String> sarray(P... p_args) {
811-
Vector<String> arr;
812-
sarray_add_str(arr, p_args...);
813-
return arr;
798+
return Vector<String>({ String(p_args)... });
814799
}

0 commit comments

Comments
 (0)