From 14248bb6c6b97728dce47f21087c41e3c6ef41e1 Mon Sep 17 00:00:00 2001 From: Lynix Date: Tue, 10 Apr 2018 23:52:28 +0200 Subject: [PATCH] Example/SpacebattleDemo: Take const ref to EntityHandles --- examples/Particles/SpacebattleDemo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/Particles/SpacebattleDemo.cpp b/examples/Particles/SpacebattleDemo.cpp index 1dd7eb0ec..58d9e1957 100644 --- a/examples/Particles/SpacebattleDemo.cpp +++ b/examples/Particles/SpacebattleDemo.cpp @@ -343,7 +343,7 @@ void SpacebattleExample::Enter(Ndk::StateMachine& fsm) CreateSpaceShip(); CreateTurret(); - Ndk::EntityHandle light = m_shared.world3D->CreateEntity(); + const Ndk::EntityHandle& light = m_shared.world3D->CreateEntity(); Ndk::NodeComponent& lightNode = light->AddComponent(); Ndk::LightComponent& lightComp = light->AddComponent(Nz::LightType_Directional); lightNode.SetRotation(Nz::EulerAnglesf(-30.f, 0.f, 0.f)); @@ -360,7 +360,7 @@ void SpacebattleExample::Enter(Ndk::StateMachine& fsm) m_turretCannonBaseRotation = 0.f; m_turretShootTimer = 0.f; - Ndk::EntityHandle torpedoGroupEntity = m_shared.world3D->CreateEntity(); + const Ndk::EntityHandle& torpedoGroupEntity = m_shared.world3D->CreateEntity(); m_torpedoGroup = torpedoGroupEntity->AddComponent(200, m_torpedoDeclaration).CreateHandle(); RegisterParticleGroup(torpedoGroupEntity);