Make the parameters of String's and PoolVector's join() const ref.

This commit is contained in:
Relintai 2023-05-25 22:27:34 +02:00
parent 474e253aa1
commit 5cb00f3622
3 changed files with 3 additions and 3 deletions

View File

@ -433,7 +433,7 @@ public:
return OK;
}
String join(String delimiter) const {
String join(const String &delimiter) const {
String rs = "";
int s = size();
Read r = read();

View File

@ -2802,7 +2802,7 @@ Vector<int> String::split_ints_mk(const Vector<String> &p_splitters, bool p_allo
return ret;
}
String String::join(Vector<String> parts) const {
String String::join(const Vector<String> &parts) const {
String ret;
for (int i = 0; i < parts.size(); ++i) {
if (i > 0) {

View File

@ -405,7 +405,7 @@ public:
Vector<int> split_ints(const String &p_splitter, bool p_allow_empty = true) const;
Vector<int> split_ints_mk(const Vector<String> &p_splitters, bool p_allow_empty = true) const;
String join(Vector<String> parts) const;
String join(const Vector<String> &parts) const;
static CharType char_uppercase(CharType p_char);
static CharType char_lowercase(CharType p_char);