Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Mar 28, 2018
1 parent ce0909a commit abcbd3c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/entt/entity/registry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,10 +950,11 @@ class Registry {
if(available) {
for(auto pos = entities.size(); pos; --pos) {
const entity_type curr = pos - 1;
const auto entt = entities[curr] & traits_type::entity_mask;
const auto entity = entities[curr];
const auto entt = entity & traits_type::entity_mask;

if(curr == entt) {
func(entities[curr]);
func(entity);
}
}
} else {
Expand Down Expand Up @@ -1206,8 +1207,9 @@ class Registry {
return (next | (entities[next] & ~traits_type::entity_mask));
};

raw_fn_type raw = [](const Registry &registry, component_type component) {
return (component < registry.pools.size() && registry.pools[component]) ? registry.pools[component]->data() : nullptr;
raw_fn_type raw = [](const Registry &registry, component_type component) -> const entity_type * {
const auto &pools = registry.pools;
return (component < pools.size() && pools[component]) ? pools[component]->data() : nullptr;
};

return { *this, seed, available, follow, raw };
Expand Down

0 comments on commit abcbd3c

Please sign in to comment.