Fixing view caches

This commit is contained in:
Zoe Roux
2021-06-04 12:56:26 +02:00
parent 0bd22502ee
commit 97add1b6d9
6 changed files with 38 additions and 10 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
#pragma once
#include <vector>
#include <list>
#include <tuple>
#include <typeindex>
#include <functional>
@@ -47,7 +47,7 @@ namespace WAL
public:
//! @brief Construct a view from a list of entities.
//! Those entities are never copied but references to them are kept internally.
explicit View(std::vector<Entity> &scene)
explicit View(std::list<Entity> &scene)
{
this->types = {typeid(Components)...};
std::copy_if(scene.begin(), scene.end(), std::back_inserter(this->entities), [](Entity &entity) {