Use append_ instead of parse_ for String methods.
This commit is contained in:
parent
594d64ec24
commit
ffa6ef220b
62 changed files with 245 additions and 274 deletions
|
|
@ -163,7 +163,7 @@ StringName ResourceLoaderBinary::_get_string() {
|
|||
}
|
||||
f->get_buffer((uint8_t *)&str_buf[0], len);
|
||||
String s;
|
||||
s.parse_utf8(&str_buf[0], len);
|
||||
s.append_utf8(&str_buf[0], len);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
@ -919,7 +919,7 @@ static String get_ustring(Ref<FileAccess> f) {
|
|||
str_buf.resize(len);
|
||||
f->get_buffer((uint8_t *)&str_buf[0], len);
|
||||
String s;
|
||||
s.parse_utf8(&str_buf[0], len);
|
||||
s.append_utf8(&str_buf[0], len);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
@ -933,7 +933,7 @@ String ResourceLoaderBinary::get_unicode_string() {
|
|||
}
|
||||
f->get_buffer((uint8_t *)&str_buf[0], len);
|
||||
String s;
|
||||
s.parse_utf8(&str_buf[0], len);
|
||||
s.append_utf8(&str_buf[0], len);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue