Merge pull request #29815 from NilsIrl/plus_file_1

Replace ` + "/" + ` with `String::file_add()`
This commit is contained in:
Rémi Verschelde 2019-07-01 12:06:35 +02:00 committed by GitHub
commit d17eac735c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 39 additions and 39 deletions

View file

@ -1334,7 +1334,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
end = bbcode.length();
String image = bbcode.substr(brk_end + 1, end - brk_end - 1);
Ref<Texture> texture = ResourceLoader::load(base_path + "/" + image, "Texture");
Ref<Texture> texture = ResourceLoader::load(base_path.plus_file(image), "Texture");
if (texture.is_valid())
p_rt->add_image(texture);
@ -1390,7 +1390,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
String fnt = tag.substr(5, tag.length());
Ref<Font> font = ResourceLoader::load(base_path + "/" + fnt, "Font");
Ref<Font> font = ResourceLoader::load(base_path.plus_file(fnt), "Font");
if (font.is_valid())
p_rt->push_font(font);
else {