You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Modernize atomics
- Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
This commit is contained in:
@@ -1727,7 +1727,7 @@ void *Object::get_script_instance_binding(int p_script_language_index) {
|
||||
if (!_script_instance_bindings[p_script_language_index]) {
|
||||
void *script_data = ScriptServer::get_language(p_script_language_index)->alloc_instance_binding_data(this);
|
||||
if (script_data) {
|
||||
atomic_increment(&instance_binding_count);
|
||||
instance_binding_count.increment();
|
||||
_script_instance_bindings[p_script_language_index] = script_data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user