Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Sep 1, 2018
1 parent 3e8a830 commit 5a9af73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/entt/entity/sparse_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ class SparseSet<Entity> {
}

pointer operator->() const ENTT_NOEXCEPT {
return &(*direct)[index-1];
const size_type pos = index-1;
return &(*direct)[pos];
}

inline reference operator*() const ENTT_NOEXCEPT {
Expand Down Expand Up @@ -665,7 +666,8 @@ class SparseSet<Entity, Type>: public SparseSet<Entity> {
}

pointer operator->() const ENTT_NOEXCEPT {
return &(*instances)[index-1];
const size_type pos = index-1;
return &(*instances)[pos];
}

inline reference operator*() const ENTT_NOEXCEPT {
Expand Down

0 comments on commit 5a9af73

Please sign in to comment.