diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2021-02-10 19:22:13 +0100 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2021-02-18 17:12:46 +0100 |
commit | 8e128726f0eac1982aa75a005554ee5b556b332e (patch) | |
tree | 827c2f478e8fb3196ef411f4941fa4e839642e31 /scene/3d/cpu_particles_3d.h | |
parent | 8870f43d742e0c48ae543d999856f5989170b62d (diff) | |
download | redot-engine-8e128726f0eac1982aa75a005554ee5b556b332e.tar.gz |
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>
Diffstat (limited to 'scene/3d/cpu_particles_3d.h')
-rw-r--r-- | scene/3d/cpu_particles_3d.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/3d/cpu_particles_3d.h b/scene/3d/cpu_particles_3d.h index 4af959a7bf..10ac32622d 100644 --- a/scene/3d/cpu_particles_3d.h +++ b/scene/3d/cpu_particles_3d.h @@ -32,6 +32,7 @@ #define CPU_PARTICLES_H #include "core/templates/rid.h" +#include "core/templates/safe_refcount.h" #include "scene/3d/visual_instance_3d.h" class CPUParticles3D : public GeometryInstance3D { @@ -142,7 +143,7 @@ private: Transform inv_emission_transform; - volatile bool can_update = false; + SafeFlag can_update; DrawOrder draw_order = DRAW_ORDER_INDEX; |