1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Use BinaryMutex instead of Mutex for StringName.

This commit is contained in:
Lukas Tenbrink
2025-04-09 14:53:16 +02:00
parent 67c96c89cc
commit e57427900f
4 changed files with 15 additions and 12 deletions

View File

@@ -39,7 +39,7 @@ struct StringName::Table {
constexpr static uint32_t TABLE_MASK = TABLE_LEN - 1;
static inline _Data *table[TABLE_LEN];
static inline Mutex mutex;
static inline BinaryMutex mutex;
static inline PagedAllocator<_Data> allocator;
};
@@ -208,13 +208,6 @@ StringName::StringName(const StringName &p_name) {
}
}
void StringName::assign_static_unique_class_name(StringName *ptr, const char *p_name) {
MutexLock lock(Table::mutex);
if (*ptr == StringName()) {
*ptr = StringName(p_name, true);
}
}
StringName::StringName(const char *p_name, bool p_static) {
_data = nullptr;