Refactored Variant Operators.
-Using classes to call and a table -For typed code (GDS or GDNative), can obtain functions to call prevalidated or ptr.
This commit is contained in:
@ -377,3 +377,17 @@ StringName StringName::search(const String &p_name) {
|
||||
StringName::~StringName() {
|
||||
unref();
|
||||
}
|
||||
|
||||
bool operator==(const String &p_name, const StringName &p_string_name) {
|
||||
return p_name == p_string_name.operator String();
|
||||
}
|
||||
bool operator!=(const String &p_name, const StringName &p_string_name) {
|
||||
return p_name != p_string_name.operator String();
|
||||
}
|
||||
|
||||
bool operator==(const char *p_name, const StringName &p_string_name) {
|
||||
return p_name == p_string_name.operator String();
|
||||
}
|
||||
bool operator!=(const char *p_name, const StringName &p_string_name) {
|
||||
return p_name != p_string_name.operator String();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user