You've already forked godot
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user