summaryrefslogtreecommitdiffstats
path: root/src/core/String.cpp
diff options
context:
space:
mode:
authorTerraAr <37753757+TerraAr@users.noreply.github.com>2020-08-15 15:10:16 -0300
committerGitHub <noreply@github.com>2020-08-15 15:10:16 -0300
commit7d347edb12645e6a7a09539ac1ba10ae1783f2ac (patch)
tree091cbdce9f568bc384b26a82d39a253df30bb2de /src/core/String.cpp
parent5e656923cfe9469a5f33104503e10ca076ce30b8 (diff)
downloadredot-cpp-7d347edb12645e6a7a09539ac1ba10ae1783f2ac.tar.gz
Updated operator
I've updated the operator that I had created to use the private constructor of the class.
Diffstat (limited to 'src/core/String.cpp')
-rw-r--r--src/core/String.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/String.cpp b/src/core/String.cpp
index 35da37f..72222b7 100644
--- a/src/core/String.cpp
+++ b/src/core/String.cpp
@@ -135,8 +135,8 @@ void String::operator+=(const String &s) {
}
void String::operator+=(const wchar_t c) {
- String _to_be_added = c;
- _godot_string = godot::api->godot_string_operator_plus(&_godot_string, &_to_be_added._godot_string);
+ String _to_be_added = String(c);
+ *this = String(godot::api->godot_string_operator_plus(&_godot_string, &_to_be_added._godot_string));
}
bool String::operator<(const String &s) const {