1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Fix more issues found by cppcheck.

This commit is contained in:
bruvzg
2022-04-07 13:23:40 +03:00
parent f4b0c7a1ea
commit de4c97758a
63 changed files with 261 additions and 268 deletions

View File

@@ -4123,15 +4123,11 @@ String String::path_to(const String &p_path) const {
dst += "/";
}
String base;
if (src.begins_with("res://") && dst.begins_with("res://")) {
base = "res:/";
src = src.replace("res://", "/");
dst = dst.replace("res://", "/");
} else if (src.begins_with("user://") && dst.begins_with("user://")) {
base = "user:/";
src = src.replace("user://", "/");
dst = dst.replace("user://", "/");
@@ -4146,7 +4142,6 @@ String String::path_to(const String &p_path) const {
return p_path; //impossible to do this
}
base = src_begin;
src = src.substr(src_begin.length(), src.length());
dst = dst.substr(dst_begin.length(), dst.length());
}