From 7d347edb12645e6a7a09539ac1ba10ae1783f2ac Mon Sep 17 00:00:00 2001 From: TerraAr <37753757+TerraAr@users.noreply.github.com> Date: Sat, 15 Aug 2020 15:10:16 -0300 Subject: [PATCH] Updated operator I've updated the operator that I had created to use the private constructor of the class. --- src/core/String.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/String.cpp b/src/core/String.cpp index 35da37f8..72222b7e 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 {