projects
/
asdcplib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf81f87
)
added greater-than operator to Kumu::Identifier
13/head
author
Matthew Sheby
<matthew.sheby@eikongroup.co.uk>
Tue, 20 Aug 2019 06:15:42 +0000
(23:15 -0700)
committer
Matthew Sheby
<matthew.sheby@eikongroup.co.uk>
Tue, 20 Aug 2019 06:15:42 +0000
(23:15 -0700)
src/KM_util.h
patch
|
blob
|
history
diff --git
a/src/KM_util.h
b/src/KM_util.h
index e8004c151ac91f9080ebcda1f5109050a2b823ac..f3f60f187b3715b9a1d50e7af4412a3254047d8f 100755
(executable)
--- 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 );