mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Merge commit godotengine/godot9630d4e2fc1d0fdef6f46f24e236548549f31d49
This commit is contained in:
@@ -271,12 +271,10 @@ StringName::StringName(const char *p_name, bool p_static) {
|
||||
return; //empty, ignore
|
||||
}
|
||||
|
||||
const uint32_t hash = String::hash(p_name);
|
||||
const uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
MutexLock lock(mutex);
|
||||
|
||||
uint32_t hash = String::hash(p_name);
|
||||
|
||||
uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
_data = _table[idx];
|
||||
|
||||
while (_data) {
|
||||
@@ -330,12 +328,10 @@ StringName::StringName(const StaticCString &p_static_string, bool p_static) {
|
||||
|
||||
ERR_FAIL_COND(!p_static_string.ptr || !p_static_string.ptr[0]);
|
||||
|
||||
const uint32_t hash = String::hash(p_static_string.ptr);
|
||||
const uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
MutexLock lock(mutex);
|
||||
|
||||
uint32_t hash = String::hash(p_static_string.ptr);
|
||||
|
||||
uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
_data = _table[idx];
|
||||
|
||||
while (_data) {
|
||||
@@ -390,11 +386,10 @@ StringName::StringName(const String &p_name, bool p_static) {
|
||||
return;
|
||||
}
|
||||
|
||||
const uint32_t hash = p_name.hash();
|
||||
const uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
MutexLock lock(mutex);
|
||||
|
||||
uint32_t hash = p_name.hash();
|
||||
uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
_data = _table[idx];
|
||||
|
||||
while (_data) {
|
||||
@@ -448,11 +443,10 @@ StringName StringName::search(const char *p_name) {
|
||||
return StringName();
|
||||
}
|
||||
|
||||
const uint32_t hash = String::hash(p_name);
|
||||
const uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
MutexLock lock(mutex);
|
||||
|
||||
uint32_t hash = String::hash(p_name);
|
||||
uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
_Data *_data = _table[idx];
|
||||
|
||||
while (_data) {
|
||||
@@ -484,12 +478,10 @@ StringName StringName::search(const char32_t *p_name) {
|
||||
return StringName();
|
||||
}
|
||||
|
||||
const uint32_t hash = String::hash(p_name);
|
||||
const uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
MutexLock lock(mutex);
|
||||
|
||||
uint32_t hash = String::hash(p_name);
|
||||
|
||||
uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
_Data *_data = _table[idx];
|
||||
|
||||
while (_data) {
|
||||
@@ -510,12 +502,10 @@ StringName StringName::search(const char32_t *p_name) {
|
||||
StringName StringName::search(const String &p_name) {
|
||||
ERR_FAIL_COND_V(p_name.is_empty(), StringName());
|
||||
|
||||
const uint32_t hash = p_name.hash();
|
||||
const uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
MutexLock lock(mutex);
|
||||
|
||||
uint32_t hash = p_name.hash();
|
||||
|
||||
uint32_t idx = hash & STRING_TABLE_MASK;
|
||||
|
||||
_Data *_data = _table[idx];
|
||||
|
||||
while (_data) {
|
||||
|
||||
Reference in New Issue
Block a user