summaryrefslogtreecommitdiff
path: root/core/string_name.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/string_name.cpp')
-rw-r--r--core/string_name.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/string_name.cpp b/core/string_name.cpp
index 6260e3ce8c..21467825d1 100644
--- a/core/string_name.cpp
+++ b/core/string_name.cpp
@@ -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();
+}