From 03ef0f9f50c3128edc214c7cb4992471042a9069 Mon Sep 17 00:00:00 2001 From: Lynix Date: Mon, 16 Mar 2015 22:16:35 +0100 Subject: [PATCH] (World) GetEntity now returns a const reference Former-commit-id: 179139a21c639bbb2c96058095a82f3be76de5c1 --- SDK/include/NDK/World.hpp | 2 +- SDK/src/NDK/World.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SDK/include/NDK/World.hpp b/SDK/include/NDK/World.hpp index a7715754d..41fab8989 100644 --- a/SDK/include/NDK/World.hpp +++ b/SDK/include/NDK/World.hpp @@ -29,7 +29,7 @@ namespace Ndk void Clear(); - EntityHandle GetEntity(Entity::Id id); + const EntityHandle& GetEntity(Entity::Id id); void KillEntity(const EntityHandle& entity); void KillEntities(const EntityList& list); diff --git a/SDK/src/NDK/World.cpp b/SDK/src/NDK/World.cpp index 10256a785..7e2984de5 100644 --- a/SDK/src/NDK/World.cpp +++ b/SDK/src/NDK/World.cpp @@ -62,7 +62,7 @@ namespace Ndk m_killedEntities.UnboundedSet(entity->GetId(), true); } - EntityHandle World::GetEntity(Entity::Id id) + const EntityHandle& World::GetEntity(Entity::Id id) { if (IsEntityIdValid(id)) return m_aliveEntities[m_entities[id].aliveIndex];