diff --git a/src/EC/Manager.hpp b/src/EC/Manager.hpp index 11c9134..6c93f90 100644 --- a/src/EC/Manager.hpp +++ b/src/EC/Manager.hpp @@ -119,7 +119,7 @@ namespace EC std::array range; Manager *manager; EntitiesType *entities; - BitsetType signature; + const BitsetType *signature; void *userData; std::unordered_set dead; }; @@ -818,7 +818,7 @@ namespace EC fnDataAr[i].range = {begin, end}; fnDataAr[i].manager = this; fnDataAr[i].entities = &entities; - fnDataAr[i].signature = signatureBitset; + fnDataAr[i].signature = &signatureBitset; fnDataAr[i].userData = userData; for(std::size_t j = begin; j < end; ++j) { if(!isAlive(j)) { @@ -834,10 +834,10 @@ namespace EC continue; } - if(((data->signature) + if(((*data->signature) & std::get( data->entities->at(i))) - == data->signature) { + == *data->signature) { Helper::call(i, *data->manager, std::forward(function), @@ -2006,7 +2006,7 @@ namespace EC fnDataAr[i].range = {begin, end}; fnDataAr[i].manager = this; fnDataAr[i].entities = &entities; - fnDataAr[i].signature = signatureBitset; + fnDataAr[i].signature = &signatureBitset; fnDataAr[i].userData = userData; for(std::size_t j = begin; j < end; ++j) { if(!isAlive(j)) { @@ -2019,10 +2019,10 @@ namespace EC ++i) { if(data->dead.find(i) != data->dead.end()) { continue; - } else if((data->signature + } else if((*data->signature & std::get( data->entities->at(i))) - == data->signature) { + == *data->signature) { fn(i, data->manager, data->userData); } }