CDImage: Relational operators for Position
This commit is contained in:
parent
88eec0a56b
commit
f9e964e34d
|
@ -76,6 +76,21 @@ public:
|
|||
*this = *this + pos;
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue