Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-07-31 18:21:28 +0000
committerStijn Buys <ingar@osirion.org>2011-07-31 18:21:28 +0000
commit5a464fca4618af9eeb0fe3f2c43d148fb194a015 (patch)
tree09d3e891ce6f315e6231b36edd0ae8084b2f875e
parent9652995287be63ecc34de9bf2174b3f22435861d (diff)
Improved constness of core::Zone::find_entity
-rw-r--r--src/core/zone.cc4
-rw-r--r--src/core/zone.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/zone.cc b/src/core/zone.cc
index c298f78..8c74457 100644
--- a/src/core/zone.cc
+++ b/src/core/zone.cc
@@ -191,11 +191,11 @@ void Zone::remove(Entity *entity)
}
}
-Entity *Zone::find_entity(Entity *entity)
+Entity *Zone::find_entity(const Entity *entity)
{
for (Content::iterator it = zone_content.begin(); it != zone_content.end(); it++) {
if ((*it) == entity) {
- return entity;
+ return (*it);
}
}
diff --git a/src/core/zone.h b/src/core/zone.h
index d2cdf2c..f80999d 100644
--- a/src/core/zone.h
+++ b/src/core/zone.h
@@ -97,7 +97,7 @@ public:
}
/// find an entity inside a zone
- Entity *find_entity(Entity *entity);
+ Entity *find_entity(const Entity *entity);
/// find an entity inside a zone
Entity *find_entity(unsigned int id);