From b66fd63cb432162ea495ecb9f5717fc3daec758f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 23 Jul 2022 10:29:19 +0200 Subject: [PATCH] remove doubly defines --- src/fsfw/serialize/SerializeIF.h | 14 -------------- unittests/tmtcpacket/testCcsds.cpp | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/fsfw/serialize/SerializeIF.h b/src/fsfw/serialize/SerializeIF.h index 0c0e4c42..9fc5b731 100644 --- a/src/fsfw/serialize/SerializeIF.h +++ b/src/fsfw/serialize/SerializeIF.h @@ -74,20 +74,6 @@ class SerializeIF { return serialize(buffer, size, maxSize, SerializeIF::Endianness::MACHINE); } - /** - * Forwards to regular @serialize call with network endianness - */ - virtual ReturnValue_t serializeNe(uint8_t** buffer, size_t* size, size_t maxSize) { - return serialize(buffer, size, maxSize, SerializeIF::Endianness::NETWORK); - } - - /** - * If endianness is not explicitly specified, use machine endianness - */ - virtual ReturnValue_t serialize(uint8_t **buffer, size_t *size, size_t maxSize) { - return serialize(buffer, size, maxSize, SerializeIF::Endianness::MACHINE); - } - /** * Gets the size of a object if it would be serialized in a buffer * @return Size of serialized object diff --git a/unittests/tmtcpacket/testCcsds.cpp b/unittests/tmtcpacket/testCcsds.cpp index 7f337b6d..1bae5912 100644 --- a/unittests/tmtcpacket/testCcsds.cpp +++ b/unittests/tmtcpacket/testCcsds.cpp @@ -41,7 +41,7 @@ TEST_CASE("CCSDS Packet ID", "[ccsds-packet-id]") { packetId.secHeaderFlag = false; packetId.packetType = ccsds::PacketType::TM; REQUIRE(packetId.raw() == 0x1ff); - REQUIRE(packetId.SerializeIF::serialize(buf.data(), buf.size(), SerializeIF::Endianness::NETWORK) == + REQUIRE(packetId.SerializeIF::serializeNe(buf.data(), buf.size()) == HasReturnvaluesIF::RETURN_OK); REQUIRE(buf[0] == 0x1); REQUIRE(buf[1] == 0xff);