From 8e21dc2646b8dad7f9f231cc337a88c10a7091d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Sun, 3 Jan 2021 00:02:48 +0100 Subject: [PATCH] Comply with another MSVC weirdness (see https://tpt.io/:24744) --- src/simulation/Particle.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/simulation/Particle.cpp b/src/simulation/Particle.cpp index 06b6896ed..b15134f99 100644 --- a/src/simulation/Particle.cpp +++ b/src/simulation/Particle.cpp @@ -4,20 +4,20 @@ std::vector const &Particle::GetProperties() { static std::vector properties = { - { "type" , StructProperty::ParticleType, offsetof(Particle, type ) }, - { "life" , StructProperty::ParticleType, offsetof(Particle, life ) }, - { "ctype" , StructProperty::ParticleType, offsetof(Particle, ctype ) }, - { "x" , StructProperty::Float , offsetof(Particle, x ) }, - { "y" , StructProperty::Float , offsetof(Particle, y ) }, - { "vx" , StructProperty::Float , offsetof(Particle, vx ) }, - { "vy" , StructProperty::Float , offsetof(Particle, vy ) }, - { "temp" , StructProperty::Float , offsetof(Particle, temp ) }, - { "flags" , StructProperty::UInteger , offsetof(Particle, flags ) }, - { "tmp" , StructProperty::Integer , offsetof(Particle, tmp ) }, - { "tmp2" , StructProperty::Integer , offsetof(Particle, tmp2 ) }, - { "dcolour", StructProperty::UInteger , offsetof(Particle, dcolour) }, - { "pavg0" , StructProperty::Float , offsetof(Particle, pavg[0]) }, - { "pavg1" , StructProperty::Float , offsetof(Particle, pavg[1]) }, + { "type" , StructProperty::ParticleType, (intptr_t)(offsetof(Particle, type )) }, + { "life" , StructProperty::ParticleType, (intptr_t)(offsetof(Particle, life )) }, + { "ctype" , StructProperty::ParticleType, (intptr_t)(offsetof(Particle, ctype )) }, + { "x" , StructProperty::Float , (intptr_t)(offsetof(Particle, x )) }, + { "y" , StructProperty::Float , (intptr_t)(offsetof(Particle, y )) }, + { "vx" , StructProperty::Float , (intptr_t)(offsetof(Particle, vx )) }, + { "vy" , StructProperty::Float , (intptr_t)(offsetof(Particle, vy )) }, + { "temp" , StructProperty::Float , (intptr_t)(offsetof(Particle, temp )) }, + { "flags" , StructProperty::UInteger , (intptr_t)(offsetof(Particle, flags )) }, + { "tmp" , StructProperty::Integer , (intptr_t)(offsetof(Particle, tmp )) }, + { "tmp2" , StructProperty::Integer , (intptr_t)(offsetof(Particle, tmp2 )) }, + { "dcolour", StructProperty::UInteger , (intptr_t)(offsetof(Particle, dcolour)) }, + { "pavg0" , StructProperty::Float , (intptr_t)(offsetof(Particle, pavg[0])) }, + { "pavg1" , StructProperty::Float , (intptr_t)(offsetof(Particle, pavg[1])) }, }; return properties; }