From 0939e0014a4dbbdd7ca35f4ae78dcc90fd44cc9a Mon Sep 17 00:00:00 2001
From: Dimitrios Stoupis <dimitris.apple@gmail.com>
Date: Sat, 16 Mar 2019 20:45:06 +0000
Subject: [PATCH] Added comparison operator definition for the messages

- This operator needs to be defined well, when the application ID and
sequence count is implemented
---
 inc/Message.hpp | 16 ++++++++--------
 lib/Catch2      |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/inc/Message.hpp b/inc/Message.hpp
index 8ce47f8d..6de13c22 100644
--- a/inc/Message.hpp
+++ b/inc/Message.hpp
@@ -21,12 +21,12 @@ class Message;
  */
 class Message {
 public:
-	Message () = default;
-
+	Message() = default;
 
+	// Define the message comparison operator
 	bool operator==(const Message &msg) const {
-		return 	(this->packetType == msg.packetType) && (this->data == msg.data) &&
-		(this->messageType == msg.messageType) && (this->serviceType == msg.serviceType);
+		return (this->packetType == msg.packetType) &&
+		       (this->messageType == msg.messageType) && (this->serviceType == msg.serviceType);
 	}
 
 	enum PacketType {
@@ -102,7 +102,7 @@ public:
 	 * @param string The string to insert
 	 */
 	template<const size_t SIZE>
-	void appendString(const String<SIZE> & string);
+	void appendString(const String<SIZE> &string);
 
 	/**
 	 * Reads the next \p numBits bits from the the message in a big-endian format
@@ -278,10 +278,10 @@ public:
 	 * PTC = 7, PFC = 0
 	 */
 	template<const size_t SIZE>
-	void appendOctetString(const String<SIZE> & string) {
+	void appendOctetString(const String<SIZE> &string) {
 		// Make sure that the string is large enough to count
 		assertI(string.size() <= (std::numeric_limits<uint16_t>::max)(),
-			ErrorHandler::StringTooLarge);
+		        ErrorHandler::StringTooLarge);
 
 		appendUint16(string.size());
 		appendString(string);
@@ -440,7 +440,7 @@ public:
 };
 
 template<const size_t SIZE>
-inline void Message::appendString(const String<SIZE> & string) {
+inline void Message::appendString(const String<SIZE> &string) {
 	assertI(dataSize + string.size() < ECSS_MAX_MESSAGE_SIZE, ErrorHandler::MessageTooLarge);
 	// TODO: Do we need to keep this check? How does etl::string handle it?
 	assertI(string.size() <= string.capacity(), ErrorHandler::StringTooLarge);
diff --git a/lib/Catch2 b/lib/Catch2
index d6330727..62460faf 160000
--- a/lib/Catch2
+++ b/lib/Catch2
@@ -1 +1 @@
-Subproject commit d63307279412de3870cf97cc6802bae8ab36089e
+Subproject commit 62460fafe6b54c3173bc5cbc46d05a5f071017ff
-- 
GitLab