repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8b99ad0
)
added operator == for cec_datapacket
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 18 Mar 2013 15:04:02 +0000
(16:04 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 18 Mar 2013 15:04:02 +0000
(16:04 +0100)
include/cectypes.h
patch
|
blob
|
blame
|
history
diff --git
a/include/cectypes.h
b/include/cectypes.h
index e8670f8e7df2fa1c900e8f378f929b68533076a2..95194f61ecfb8f6ed0eb53924faa212513477b6b 100644
(file)
--- a/
include/cectypes.h
+++ b/
include/cectypes.h
@@
-915,6
+915,16
@@
typedef struct cec_datapacket
return *this;
}
return *this;
}
+ bool operator ==(const struct cec_datapacket& packet) const
+ {
+ if (size != packet.size)
+ return false;
+ for (uint8_t iPtr = 0; iPtr < size; iPtr++)
+ if (packet.data[iPtr] != data[iPtr])
+ return false;
+ return true;
+ }
+
bool IsEmpty(void) const { return size == 0; } /**< @return True when this packet is empty, false otherwise. */
bool IsFull(void) const { return size == 100; } /**< @return True when this packet is false, false otherwise. */
bool IsEmpty(void) const { return size == 0; } /**< @return True when this packet is empty, false otherwise. */
bool IsFull(void) const { return size == 100; } /**< @return True when this packet is false, false otherwise. */