Skip to content

Commit 8afb331

Browse files
committed
Optimize and simplify sarray.
1 parent 428a762 commit 8afb331

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
@@ -792,22 +792,7 @@ _FORCE_INLINE_ String ETRN(const String &p_text, const String &p_text_plural, in
792792

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

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

0 commit comments

Comments
 (0)