From 6e07bb18771b557b8df20df7a94026d2b1b200e4 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Thu, 16 Jun 2022 13:26:06 +0900 Subject: [PATCH] Undo change of temporary struct in Manager --- src/EC/Manager.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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); } }