From 820408d80ed617d75c0d4d68230cbce740e99f66 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Mon, 6 Jan 2025 14:37:52 +0100 Subject: [PATCH] Fix small review findings --- CMakeLists.txt | 1 - source/iceoryx_dds/dds/fast_context.cpp | 2 +- test/helpers/fixture_dds_gateway.hpp | 1 - test/mocks/google_mocks.hpp | 22 ++++++++++++++++------ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 221efd6..ff30236 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,6 @@ if(NOT iceoryx_platform_FOUND OR NOT iceoryx_hoofs_FOUND OR NOT iceoryx_posh_FOU FetchContent_Declare( iceoryx GIT_REPOSITORY https://github.com/eclipse-iceoryx/iceoryx.git - # Recent commit used here to be able to use the CMake macros. Change this to v3.x once released. GIT_TAG v2.95.3 ) FetchContent_GetProperties(iceoryx) diff --git a/source/iceoryx_dds/dds/fast_context.cpp b/source/iceoryx_dds/dds/fast_context.cpp index 75608c8..bcedd20 100644 --- a/source/iceoryx_dds/dds/fast_context.cpp +++ b/source/iceoryx_dds/dds/fast_context.cpp @@ -40,7 +40,7 @@ eprosima::fastdds::dds::Topic* iox::dds::FastContext::getTopic(const std::string } else { - IOX_LOG(WARN, "[FastDataReader] Failed to find topic: " << topicName=; + IOX_LOG(WARN, "[FastDataReader] Failed to find topic: " << topicName); } topic = m_participant->create_topic(topicName, "Mempool::Chunk", eprosima::fastdds::dds::TOPIC_QOS_DEFAULT); diff --git a/test/helpers/fixture_dds_gateway.hpp b/test/helpers/fixture_dds_gateway.hpp index 264eb63..c30ee31 100644 --- a/test/helpers/fixture_dds_gateway.hpp +++ b/test/helpers/fixture_dds_gateway.hpp @@ -37,7 +37,6 @@ class DDSGatewayTestFixture : public Test size_t m_mockIceoryxTerminalCursor = 0; size_t m_mockDDSTerminalMarker = 0; - void SetUp() {}; void TearDown() { m_stagedMockIceoryxTerminal.clear(); diff --git a/test/mocks/google_mocks.hpp b/test/mocks/google_mocks.hpp index e091cb6..8903095 100644 --- a/test/mocks/google_mocks.hpp +++ b/test/mocks/google_mocks.hpp @@ -41,7 +41,9 @@ using ::testing::_; class MockPublisher { public: - MockPublisher(const iox::capro::ServiceDescription&, const iox::popo::PublisherOptions&) {}; + MockPublisher(const iox::capro::ServiceDescription&, const iox::popo::PublisherOptions&) + { + } virtual ~MockPublisher() = default; MOCK_CONST_METHOD0(getUid, iox::popo::uid_t()); MOCK_METHOD0(offer, void(void)); @@ -53,7 +55,9 @@ class MockPublisher class MockSubscriber { public: - MockSubscriber(const iox::capro::ServiceDescription&, const iox::popo::SubscriberOptions&) {}; + MockSubscriber(const iox::capro::ServiceDescription&, const iox::popo::SubscriberOptions&) + { + } MOCK_CONST_METHOD0(getUid, iox::popo::uid_t()); MOCK_CONST_METHOD0(getServiceDescription, iox::capro::ServiceDescription()); MOCK_METHOD0(subscribe, void()); @@ -70,7 +74,9 @@ class MockSubscriber class MockDataReader { public: - MockDataReader(const iox::capro::ServiceDescription&) {}; + MockDataReader(const iox::capro::ServiceDescription&) + { + } MOCK_METHOD0(connect, void(void)); MOCK_METHOD0(peekNextIoxChunkDatagramHeader, iox::optional(void)); MOCK_METHOD3(takeNext, @@ -85,7 +91,9 @@ class MockDataReader class MockDataWriter { public: - MockDataWriter(const iox::capro::ServiceDescription&) {}; + MockDataWriter(const iox::capro::ServiceDescription&) + { + } MOCK_METHOD0(connect, void(void)); MOCK_METHOD3(write, bool(iox::dds::IoxChunkDatagramHeader, const uint8_t* const, const uint8_t* const)); MOCK_CONST_METHOD0(getServiceId, std::string(void)); @@ -97,8 +105,10 @@ template class MockGenericGateway { public: - MockGenericGateway() {}; - MockGenericGateway(const iox::capro::Interfaces, iox::units::Duration, iox::units::Duration) {}; + MockGenericGateway() = default; + MockGenericGateway(const iox::capro::Interfaces, iox::units::Duration, iox::units::Duration) + { + } MOCK_METHOD2_T(addChannel, iox::expected(const iox::capro::ServiceDescription&, const IceoryxPubSubOptions&));