diff --git a/Source/Engine/Particles/ParticlesData.h b/Source/Engine/Particles/ParticlesData.h index c47e18dc8..5f8dd6332 100644 --- a/Source/Engine/Particles/ParticlesData.h +++ b/Source/Engine/Particles/ParticlesData.h @@ -423,19 +423,16 @@ public: return Get(index); } - T Get(int32 index) const + FORCE_INLINE T Get(int32 index) const { - ASSERT(IsValid()); - ASSERT(index >= 0 && index < _buffer->CPU.Count); + ASSERT(IsValid() && index >= 0 && index < _buffer->CPU.Count); return *(T*)(_buffer->CPU.Buffer.Get() + _offset + index * _buffer->Stride); } FORCE_INLINE T Get(int32 index, const T& defaultValue) const { if (IsValid()) - { return Get(index); - } return defaultValue; } };