소스 검색

Updated operator

I've updated the operator that I had created to use the private constructor of the class.
TerraAr 5 년 전
부모
커밋
7d347edb12
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/core/String.cpp

+ 2 - 2
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 {