summaryrefslogtreecommitdiff
path: root/src/AS_DCP.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/AS_DCP.h')
-rwxr-xr-xsrc/AS_DCP.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/AS_DCP.h b/src/AS_DCP.h
index 9c9165f..a9f8b44 100755
--- a/src/AS_DCP.h
+++ b/src/AS_DCP.h
@@ -246,6 +246,18 @@ namespace ASDCP {
inline bool operator!=(const Rational& rhs) const {
return ( rhs.Numerator != Numerator || rhs.Denominator != Denominator );
}
+
+ inline bool operator<(const Rational& rhs) {
+ if ( Numerator < rhs.Numerator ) return true;
+ if ( Numerator == rhs.Numerator && Denominator < rhs.Denominator ) return true;
+ return false;
+ }
+
+ inline bool operator>(const Rational& rhs) {
+ if ( Numerator > rhs.Numerator ) return true;
+ if ( Numerator == rhs.Numerator && Denominator > rhs.Denominator ) return true;
+ return false;
+ }
};
// common edit rates, use these instead of hard coded constants