diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-04-07 13:23:40 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-04-20 10:34:00 +0300 |
commit | de4c97758af117af97fad58e4a80ffeba0154ba8 (patch) | |
tree | 2139631cc24a59900a840b9371d5043183558fbd /core/string | |
parent | f4b0c7a1ea8d86c1dfd96478ca12ad1360903d9d (diff) |
Fix more issues found by cppcheck.
Diffstat (limited to 'core/string')
-rw-r--r-- | core/string/ustring.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 7cfd34b53e..f4a3512d3a 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -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()); } |