String operator_plus fix

pull/17/head
Ramesh Ravone 2017-07-22 19:11:38 +05:30
parent a3bcda958e
commit 36561b5853
No known key found for this signature in database
GPG Key ID: 90B471D9AC10312A
2 changed files with 3 additions and 4 deletions

View File

@ -50,7 +50,6 @@ public:
#define GODOT_NATIVE_TERMINATE(arg) extern "C" void GD_EXPORT godot_native_terminate(arg) #define GODOT_NATIVE_TERMINATE(arg) extern "C" void GD_EXPORT godot_native_terminate(arg)
#define GODOT_CLASS(Name) \ #define GODOT_CLASS(Name) \
public: inline static char *___get_type_name() { return (char *) #Name; } \ public: inline static char *___get_type_name() { return (char *) #Name; } \
private: private:
@ -58,7 +57,7 @@ public:
#define GODOT_SUBCLASS(Name, Base) \ #define GODOT_SUBCLASS(Name, Base) \
public: inline static char *___get_type_name() { return (char *) #Name; } \ public: inline static char *___get_type_name() { return (char *) #Name; } \
inline static char *___get_base_type_name() { return (char *) #Base; } \ inline static char *___get_base_type_name() { return (char *) #Base; } \
inline Name(godot_object *o) : Base(o) {} \ //inline Name(godot_object *o) : Base(o) {} \
private: private:

View File

@ -84,14 +84,14 @@ bool String::operator !=(const String &s)
String String::operator +(const String &s) String String::operator +(const String &s)
{ {
String new_string = *this; String new_string = *this;
godot_string_operator_plus(&new_string._godot_string, &s._godot_string); new_string._godot_string = godot_string_operator_plus(&new_string._godot_string, &s._godot_string);
return new_string; return new_string;
} }
void String::operator +=(const String &s) void String::operator +=(const String &s)
{ {
godot_string_operator_plus(&_godot_string, &s._godot_string); _godot_string = godot_string_operator_plus(&_godot_string, &s._godot_string);
} }
void String::operator +=(const wchar_t c) void String::operator +=(const wchar_t c)