Skip to content

Commit

Permalink
Entity : friend -> member
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubpa committed Aug 3, 2020
1 parent 73035e1 commit d6f8196
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/UECS/Entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ namespace Ubpa::UECS {
public:
size_t Idx() const noexcept { return idx; }
size_t Version() const noexcept { return version; }
friend bool operator==(const Entity& x, const Entity& y) noexcept {
return x.idx == y.idx && x.version == y.version;
bool operator==(const Entity& rhs) const noexcept {
return idx == rhs.idx && version == rhs.version;
}
friend bool operator<(const Entity& x, const Entity& y) noexcept {
return x.idx < y.idx || (x.idx == y.idx && x.version < y.version);
bool operator<(const Entity& rhs) const noexcept {
return idx < rhs.idx || (idx == rhs.idx && version < rhs.version);
}
static constexpr Entity Invalid() noexcept { return { size_t_invalid,size_t_invalid }; }
private:
Expand Down

0 comments on commit d6f8196

Please sign in to comment.