diff options
| author | Matthew Sheby <matthew.sheby@eikongroup.co.uk> | 2019-08-19 23:15:42 -0700 |
|---|---|---|
| committer | Matthew Sheby <matthew.sheby@eikongroup.co.uk> | 2019-08-19 23:15:42 -0700 |
| commit | 75ca93c530e1f2531c66f7027213ec7514918508 (patch) | |
| tree | aa8c46d20236a48d0be6f9e2eeb2bb91d0f77173 /src | |
| parent | cf81f87c1517aabb892f0ea29ab5b6f7d8a09d47 (diff) | |
added greater-than operator to Kumu::Identifier
Diffstat (limited to 'src')
| -rwxr-xr-x | src/KM_util.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/KM_util.h b/src/KM_util.h index e8004c1..f3f60f1 100755 --- a/src/KM_util.h +++ b/src/KM_util.h @@ -303,6 +303,18 @@ namespace Kumu return false; } + inline bool operator>(const Identifier& rhs) const { + ui32_t test_size = xmin(rhs.Size(), SIZE); + + for ( ui32_t i = 0; i < test_size; i++ ) + { + if ( m_Value[i] != rhs.m_Value[i] ) + return m_Value[i] > rhs.m_Value[i]; + } + + return false; + } + inline bool operator==(const Identifier& rhs) const { if ( rhs.Size() != SIZE ) return false; return ( memcmp(m_Value, rhs.m_Value, SIZE) == 0 ); |
