Undo change of temporary struct in Manager
This commit is contained in:
parent
c245b438a7
commit
6e07bb1877
1 changed files with 7 additions and 7 deletions
|
@ -119,7 +119,7 @@ namespace EC
|
||||||
std::array<std::size_t, 2> range;
|
std::array<std::size_t, 2> range;
|
||||||
Manager *manager;
|
Manager *manager;
|
||||||
EntitiesType *entities;
|
EntitiesType *entities;
|
||||||
BitsetType signature;
|
const BitsetType *signature;
|
||||||
void *userData;
|
void *userData;
|
||||||
std::unordered_set<std::size_t> dead;
|
std::unordered_set<std::size_t> dead;
|
||||||
};
|
};
|
||||||
|
@ -818,7 +818,7 @@ namespace EC
|
||||||
fnDataAr[i].range = {begin, end};
|
fnDataAr[i].range = {begin, end};
|
||||||
fnDataAr[i].manager = this;
|
fnDataAr[i].manager = this;
|
||||||
fnDataAr[i].entities = &entities;
|
fnDataAr[i].entities = &entities;
|
||||||
fnDataAr[i].signature = signatureBitset;
|
fnDataAr[i].signature = &signatureBitset;
|
||||||
fnDataAr[i].userData = userData;
|
fnDataAr[i].userData = userData;
|
||||||
for(std::size_t j = begin; j < end; ++j) {
|
for(std::size_t j = begin; j < end; ++j) {
|
||||||
if(!isAlive(j)) {
|
if(!isAlive(j)) {
|
||||||
|
@ -834,10 +834,10 @@ namespace EC
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(((data->signature)
|
if(((*data->signature)
|
||||||
& std::get<BitsetType>(
|
& std::get<BitsetType>(
|
||||||
data->entities->at(i)))
|
data->entities->at(i)))
|
||||||
== data->signature) {
|
== *data->signature) {
|
||||||
Helper::call(i,
|
Helper::call(i,
|
||||||
*data->manager,
|
*data->manager,
|
||||||
std::forward<Function>(function),
|
std::forward<Function>(function),
|
||||||
|
@ -2006,7 +2006,7 @@ namespace EC
|
||||||
fnDataAr[i].range = {begin, end};
|
fnDataAr[i].range = {begin, end};
|
||||||
fnDataAr[i].manager = this;
|
fnDataAr[i].manager = this;
|
||||||
fnDataAr[i].entities = &entities;
|
fnDataAr[i].entities = &entities;
|
||||||
fnDataAr[i].signature = signatureBitset;
|
fnDataAr[i].signature = &signatureBitset;
|
||||||
fnDataAr[i].userData = userData;
|
fnDataAr[i].userData = userData;
|
||||||
for(std::size_t j = begin; j < end; ++j) {
|
for(std::size_t j = begin; j < end; ++j) {
|
||||||
if(!isAlive(j)) {
|
if(!isAlive(j)) {
|
||||||
|
@ -2019,10 +2019,10 @@ namespace EC
|
||||||
++i) {
|
++i) {
|
||||||
if(data->dead.find(i) != data->dead.end()) {
|
if(data->dead.find(i) != data->dead.end()) {
|
||||||
continue;
|
continue;
|
||||||
} else if((data->signature
|
} else if((*data->signature
|
||||||
& std::get<BitsetType>(
|
& std::get<BitsetType>(
|
||||||
data->entities->at(i)))
|
data->entities->at(i)))
|
||||||
== data->signature) {
|
== *data->signature) {
|
||||||
fn(i, data->manager, data->userData);
|
fn(i, data->manager, data->userData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue