added operator overload for string

This commit is contained in:
Karroffel
2017-03-18 15:23:28 +01:00
parent 80e3e74934
commit 7fa7f7b9c5
5 changed files with 16 additions and 5 deletions

View File

@@ -173,7 +173,7 @@ struct _WrappedMethod1<T, void, A0> {
(obj->*(method->f))(*arg[0]);
return v;
}
}
};

View File

@@ -66,6 +66,11 @@ int String::length() const
return len;
}
void String::operator =(const String &s)
{
godot_string_copy_string(&_godot_string, &s._godot_string);
}
bool String::operator ==(const String &s)
{
return godot_string_operator_equal(&_godot_string, &s._godot_string);

View File

@@ -41,6 +41,8 @@ public:
int length() const;
void operator =(const String &s);
bool operator ==(const String &s);
bool operator !=(const String &s);