Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions libopenage/coord/coord.h.template
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,8 @@ struct Coord${camelcase}Absolute {
return static_cast<Absolute &>(*this);
}

constexpr bool operator ==(const Absolute &other) const {
return ${formatted_members("(this->{0} == other.{0})", join_with=" && ")};
}

constexpr bool operator !=(const Absolute &other) const {
return !(*this == other);
friend constexpr bool operator ==(const Absolute &lhs, const Absolute &rhs) {
return ${formatted_members("(lhs.{0} == rhs.{0})", join_with=" && ")};
}
};

Expand Down Expand Up @@ -167,12 +163,8 @@ struct Coord${camelcase}Relative {
return static_cast<Relative &>(*this);
}

constexpr bool operator ==(const Relative &other) const {
return ${formatted_members("(this->{0} == other.{0})", join_with=" && ")};
}

constexpr bool operator !=(const Relative &other) const {
return !(*this == other);
friend constexpr bool operator ==(const Relative &lhs, const Relative &rhs) {
return ${formatted_members("(lhs.{0} == rhs.{0})", join_with=" && ")};
}
};

Expand Down
Loading