aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlec Thomas <alec@swapoff.org>2013-09-05 17:32:46 -0400
committerAlec Thomas <alec@swapoff.org>2013-09-05 17:32:46 -0400
commitd11326747b0281142ef98923d6efb0815b45af8b (patch)
tree62fc9d69961fff8317a754a695ed0f7d5030a993
parent3caea41b6e1fcd4af31214cb7e1bfc8958f51371 (diff)
Speed up iterator creation a bit by avoiding some copies.
-rw-r--r--entityx/Entity.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/entityx/Entity.h b/entityx/Entity.h
index 28c1b5d..8edd109 100644
--- a/entityx/Entity.h
+++ b/entityx/Entity.h
@@ -291,8 +291,8 @@ class EntityManager : boost::noncopyable, public enable_shared_from_this<EntityM
friend class View;
Iterator(ptr<EntityManager> manager,
- std::vector<Predicate> predicates,
- std::vector<ptr<BaseUnpacker>> unpackers,
+ const std::vector<Predicate> &predicates,
+ const std::vector<ptr<BaseUnpacker>> &unpackers,
uint32_t index)
: manager_(manager), predicates_(predicates), unpackers_(unpackers), i_(index), capacity_(manager_->capacity()) {
next();