summaryrefslogtreecommitdiffstats
path: root/core/string/ustring.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-14 23:23:54 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-14 23:23:54 +0100
commit80dbcfd9958bf6cc1d348f9a35ec671cb434a741 (patch)
treefc0a8fbc45ad9431d96980249324a07ffac4fcad /core/string/ustring.cpp
parentd7d34e4bc19a54c964d50273e35e1fb506edf2c8 (diff)
parent3b14f0334c9857a11ec8060562186aae5fe8cae0 (diff)
downloadredot-engine-80dbcfd9958bf6cc1d348f9a35ec671cb434a741.tar.gz
Merge pull request #68657 from Sauermann/fix-redundant-initialization
Remove redundant non-trivial Variant types initializations
Diffstat (limited to 'core/string/ustring.cpp')
-rw-r--r--core/string/ustring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 2ba389fc4d..d0d7b613ef 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -2839,7 +2839,7 @@ String String::substr(int p_from, int p_chars) const {
return String(*this);
}
- String s = String();
+ String s;
s.copy_from_unchecked(&get_data()[p_from], p_chars);
return s;
}