mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 06:25:37 +00:00
CDImage: Relational operators for Position
This commit is contained in:
parent
88eec0a56b
commit
f9e964e34d
|
@ -76,6 +76,21 @@ public:
|
||||||
*this = *this + pos;
|
*this = *this + pos;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define RELATIONAL_OPERATOR(op) \
|
||||||
|
bool operator##op(const Position& rhs) const \
|
||||||
|
{ \
|
||||||
|
return std::tie(minute, second, frame) op std::tie(rhs.minute, rhs.second, rhs.frame); \
|
||||||
|
}
|
||||||
|
|
||||||
|
RELATIONAL_OPERATOR(==);
|
||||||
|
RELATIONAL_OPERATOR(!=);
|
||||||
|
RELATIONAL_OPERATOR(<);
|
||||||
|
RELATIONAL_OPERATOR(<=);
|
||||||
|
RELATIONAL_OPERATOR(>);
|
||||||
|
RELATIONAL_OPERATOR(>=);
|
||||||
|
|
||||||
|
#undef RELATIONAL_OPERATOR
|
||||||
};
|
};
|
||||||
|
|
||||||
// Opening disc image.
|
// Opening disc image.
|
||||||
|
|
Loading…
Reference in a new issue