]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
Speed up iterator creation a bit by avoiding some copies.
authorAlec Thomas <alec@swapoff.org>
Thu, 5 Sep 2013 21:32:46 +0000 (17:32 -0400)
committerAlec Thomas <alec@swapoff.org>
Thu, 5 Sep 2013 21:32:46 +0000 (17:32 -0400)
entityx/Entity.h

index 28c1b5d29678055a32d63b8c5c63384e1ef4abec..8edd1094250b8aa96f5d0d4c3fdfe127b66ae85d 100644 (file)
@@ -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();