From 79dabce94ed91e2d5d171a17efa85943373f7f09 Mon Sep 17 00:00:00 2001 From: Dimitrios Stoupis <dimitris.apple@gmail.com> Date: Sat, 16 Mar 2019 01:59:38 +0000 Subject: [PATCH] Make clang-tidy and vera happy again --- inc/MessageParser.hpp | 4 ++-- inc/Services/TimeBasedSchedulingService.hpp | 4 +++- src/MessageParser.cpp | 4 ++-- test/Services/TimeBasedSchedulingService.cpp | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/inc/MessageParser.hpp b/inc/MessageParser.hpp index 0db0f8c6..b064ae2d 100644 --- a/inc/MessageParser.hpp +++ b/inc/MessageParser.hpp @@ -67,7 +67,7 @@ private: * @param length The size of the header * @param message The Message to modify based on the header */ - void parseTC(uint8_t *data, uint16_t length, Message &message); + void parseTC(const uint8_t *data, uint16_t length, Message &message); /** * Parse the ECSS Telemetry packet secondary header @@ -78,7 +78,7 @@ private: * @param length The size of the header * @param message The Message to modify based on the header */ - void parseTM(uint8_t *data, uint16_t length, Message &message); + void parseTM(const uint8_t *data, uint16_t length, Message &message); }; diff --git a/inc/Services/TimeBasedSchedulingService.hpp b/inc/Services/TimeBasedSchedulingService.hpp index f869b716..6a510a02 100644 --- a/inc/Services/TimeBasedSchedulingService.hpp +++ b/inc/Services/TimeBasedSchedulingService.hpp @@ -53,7 +53,9 @@ private: // todo: If we decide to use sub-schedules, the ID of that has to be defined // todo: If groups are used, then the group ID has to be defined here }; - etl::vector<ScheduledActivity, MAX_NUMBER_OF_ACTIVITIES> scheduledActivities; // Scheduled activity definitions + + // Scheduled activity definitions + etl::vector<ScheduledActivity, MAX_NUMBER_OF_ACTIVITIES> scheduledActivities; // Enable tester access to private members friend struct ::unit_test::Tester; diff --git a/src/MessageParser.cpp b/src/MessageParser.cpp index 7c66e17f..0feab496 100644 --- a/src/MessageParser.cpp +++ b/src/MessageParser.cpp @@ -53,7 +53,7 @@ Message MessageParser::parse(uint8_t *data, uint32_t length) { return message; } -void MessageParser::parseTC(uint8_t *data, uint16_t length, Message &message) { +void MessageParser::parseTC(const uint8_t *data, uint16_t length, Message &message) { ErrorHandler::assertRequest(length >= 5, message, ErrorHandler::UnacceptableMessage); // Individual fields of the TC header @@ -98,7 +98,7 @@ String<ECSS_EVENT_SERVICE_STRING_SIZE> MessageParser::convertTCToStr(Message &me 5); } -void MessageParser::parseTM(uint8_t *data, uint16_t length, Message &message) { +void MessageParser::parseTM(const uint8_t *data, uint16_t length, Message &message) { ErrorHandler::assertRequest(length >= 5, message, ErrorHandler::UnacceptableMessage); // Individual fields of the TM header diff --git a/test/Services/TimeBasedSchedulingService.cpp b/test/Services/TimeBasedSchedulingService.cpp index c37c1dff..6abe19f2 100644 --- a/test/Services/TimeBasedSchedulingService.cpp +++ b/test/Services/TimeBasedSchedulingService.cpp @@ -37,7 +37,7 @@ TEST_CASE("TC[11,2]", "[service][st11]") { TimeBasedSchedulingService timeSchedulingService; timeSchedulingService.disableScheduleExecution(receivedMessage); - CHECK(!unit_test::Tester::executionFunctionStatus(timeSchedulingService)); + CHECK(not unit_test::Tester::executionFunctionStatus(timeSchedulingService)); auto sch = unit_test::Tester::scheduledActivities(timeSchedulingService); } -- GitLab