diff options
author | Alec Thomas <alec@swapoff.org> | 2013-09-05 17:32:46 -0400 |
---|---|---|
committer | Alec Thomas <alec@swapoff.org> | 2013-09-05 17:32:46 -0400 |
commit | d11326747b0281142ef98923d6efb0815b45af8b (patch) | |
tree | 62fc9d69961fff8317a754a695ed0f7d5030a993 | |
parent | 3caea41b6e1fcd4af31214cb7e1bfc8958f51371 (diff) |
Speed up iterator creation a bit by avoiding some copies.
-rw-r--r-- | entityx/Entity.h | 4 |
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(); |