File tree Expand file tree Collapse file tree 3 files changed +4
-11
lines changed
modules/jolt_physics/spaces Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 3030
3131#include " string_name.h"
3232
33+ #include " core/os/mutex.h"
3334#include " core/os/os.h"
3435#include " core/string/print_string.h"
3536
@@ -176,14 +177,6 @@ int StringName::length() const {
176177 return 0 ;
177178}
178179
179- bool StringName::is_empty () const {
180- if (_data) {
181- return _data->name .is_empty ();
182- }
183-
184- return true ;
185- }
186-
187180StringName &StringName::operator =(const StringName &p_name) {
188181 if (this == &p_name) {
189182 return *this ;
Original file line number Diff line number Diff line change 3030
3131#pragma once
3232
33- #include " core/os/mutex.h"
3433#include " core/string/ustring.h"
3534#include " core/templates/safe_refcount.h"
3635
@@ -78,7 +77,7 @@ class StringName {
7877 StringName (_Data *p_data) { _data = p_data; }
7978
8079public:
81- explicit operator bool () const { return _data && !_data-> name . is_empty () ; }
80+ _FORCE_INLINE_ explicit operator bool () const { return _data; }
8281
8382 bool operator ==(const String &p_name) const ;
8483 bool operator ==(const char *p_name) const ;
@@ -88,7 +87,7 @@ class StringName {
8887 const char32_t *get_data () const { return _data ? _data->name .ptr () : U" " ; }
8988 char32_t operator [](int p_index) const ;
9089 int length () const ;
91- bool is_empty () const ;
90+ _FORCE_INLINE_ bool is_empty () const { return !_data; }
9291
9392 _FORCE_INLINE_ bool is_node_unique_name () const {
9493 if (!_data) {
Original file line number Diff line number Diff line change 3030
3131#pragma once
3232
33+ #include " core/os/mutex.h"
3334#include " core/templates/hash_map.h"
3435#include " core/templates/hash_set.h"
3536#include " core/templates/hashfuncs.h"
You can’t perform that action at this time.
0 commit comments