1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 15:40:26 +00:00

arb:: operators for connection_t

This commit is contained in:
Zeno Rogue 2022-03-27 09:02:28 +02:00
parent 08cfed6658
commit b840082c19

View File

@ -26,6 +26,8 @@ struct connection_t {
int eid;
/** 1 if this connection mirrored, 0 otherwise. do_unmirror() removes all mirrors by doubling shapes */
int mirror;
bool operator == (const arb::connection_t& b) const { return tie(sid, eid, mirror) == tie(b.sid, b.eid, b.mirror); }
bool operator < (const arb::connection_t& b) const { return tie(sid, eid, mirror) < tie(b.sid, b.eid, b.mirror); }
};
inline void print(hstream& hs, const connection_t& conn) { print(hs, tie(conn.sid, conn.eid, conn.mirror)); }