From 7ad78d41c329db0a69c8a548f89ac41e95c6c5e4 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Mon, 21 Oct 2024 11:53:00 +0100 Subject: [PATCH] Remove trailing semicolon in empty function bodies --- src/core/model/pair.h | 4 +++- src/core/model/simulator-impl.h | 4 +++- src/core/test/simulator-test-suite.cc | 11 +++++++++-- src/internet/test/ipv6-list-routing-test-suite.cc | 8 ++++++-- src/internet/test/tcp-advertised-window-test.cc | 5 ++++- src/mesh/model/dot11s/hwmp-protocol-mac.h | 6 +++++- src/mesh/model/flame/flame-protocol-mac.h | 5 ++++- src/mesh/model/mesh-wifi-interface-mac-plugin.h | 5 ++++- .../mesh-information-element-vector-test-suite.cc | 5 ++++- src/mobility/helper/ns2-mobility-helper.cc | 5 ++++- src/propagation/model/propagation-cache.h | 14 +++++++++++--- .../traced/traced-callback-typedef-test-suite.cc | 9 +++++++-- src/wifi/model/wifi-remote-station-manager.h | 5 ++++- 13 files changed, 68 insertions(+), 18 deletions(-) diff --git a/src/core/model/pair.h b/src/core/model/pair.h index 7b59da523..590041aaf 100644 --- a/src/core/model/pair.h +++ b/src/core/model/pair.h @@ -63,7 +63,9 @@ class PairValue : public AttributeValue typedef typename std::pair result_type; PairValue() - : m_value(std::make_pair(Create(), Create())){}; + : m_value(std::make_pair(Create(), Create())) + { + } /** * Construct this PairValue from a std::pair diff --git a/src/core/model/simulator-impl.h b/src/core/model/simulator-impl.h index 930016155..1138bdc36 100644 --- a/src/core/model/simulator-impl.h +++ b/src/core/model/simulator-impl.h @@ -95,7 +95,9 @@ class SimulatorImpl : public Object * * \param [in] id The event about to be processed. */ - virtual void PreEventHook(const EventId& id){}; + virtual void PreEventHook(const EventId& id) + { + } }; } // namespace ns3 diff --git a/src/core/test/simulator-test-suite.cc b/src/core/test/simulator-test-suite.cc index e48481b98..87be9075a 100644 --- a/src/core/test/simulator-test-suite.cc +++ b/src/core/test/simulator-test-suite.cc @@ -211,13 +211,20 @@ class SimulatorTemplateTestCase : public TestCase { public: SimulatorTemplateTestCase(); + /** * Ref and Unref - only here for testing of Ptr<> * * @{ */ - void Ref() const {}; - void Unref() const {}; + void Ref() const + { + } + + void Unref() const + { + } + /** @} */ private: diff --git a/src/internet/test/ipv6-list-routing-test-suite.cc b/src/internet/test/ipv6-list-routing-test-suite.cc index 24aab0ebc..bae3889bb 100644 --- a/src/internet/test/ipv6-list-routing-test-suite.cc +++ b/src/internet/test/ipv6-list-routing-test-suite.cc @@ -76,7 +76,9 @@ class Ipv6ARouting : public Ipv6RoutingProtocol { } - void PrintRoutingTable(Ptr stream, Time::Unit unit) const override{}; + void PrintRoutingTable(Ptr stream, Time::Unit unit) const override + { + } }; /** @@ -142,7 +144,9 @@ class Ipv6BRouting : public Ipv6RoutingProtocol { } - void PrintRoutingTable(Ptr stream, Time::Unit unit) const override{}; + void PrintRoutingTable(Ptr stream, Time::Unit unit) const override + { + } }; /** diff --git a/src/internet/test/tcp-advertised-window-test.cc b/src/internet/test/tcp-advertised-window-test.cc index fae88dc58..cc1e911cc 100644 --- a/src/internet/test/tcp-advertised-window-test.cc +++ b/src/internet/test/tcp-advertised-window-test.cc @@ -226,7 +226,10 @@ class TcpDropRatioErrorModel : public TcpGeneralErrorModel uint32_t packetSize) override; private: - void DoReset() override{}; + void DoReset() override + { + } + double m_dropRatio; //!< Drop ratio Ptr m_prng; //!< Random variable }; diff --git a/src/mesh/model/dot11s/hwmp-protocol-mac.h b/src/mesh/model/dot11s/hwmp-protocol-mac.h index 68bd6f5e0..2a0e84ed8 100644 --- a/src/mesh/model/dot11s/hwmp-protocol-mac.h +++ b/src/mesh/model/dot11s/hwmp-protocol-mac.h @@ -50,8 +50,12 @@ class HwmpProtocolMac : public MeshWifiInterfaceMacPlugin WifiMacHeader& header, Mac48Address from, Mac48Address to) override; + // Update beacon is empty, because HWMP does not know anything about beacons - void UpdateBeacon(MeshWifiBeacon& beacon) const override{}; + void UpdateBeacon(MeshWifiBeacon& beacon) const override + { + } + int64_t AssignStreams(int64_t stream) override; private: diff --git a/src/mesh/model/flame/flame-protocol-mac.h b/src/mesh/model/flame/flame-protocol-mac.h index 974da0491..9386edc96 100644 --- a/src/mesh/model/flame/flame-protocol-mac.h +++ b/src/mesh/model/flame/flame-protocol-mac.h @@ -59,11 +59,14 @@ class FlameProtocolMac : public MeshWifiInterfaceMacPlugin WifiMacHeader& header, Mac48Address from, Mac48Address to) override; + /** * Update beacon is empty, because FLAME does not know anything about beacons * \param beacon the beacon */ - void UpdateBeacon(MeshWifiBeacon& beacon) const override{}; + void UpdateBeacon(MeshWifiBeacon& beacon) const override + { + } /** * AssignStreams is empty, because this model doesn't use random variables diff --git a/src/mesh/model/mesh-wifi-interface-mac-plugin.h b/src/mesh/model/mesh-wifi-interface-mac-plugin.h index 7e72947c0..2f7961274 100644 --- a/src/mesh/model/mesh-wifi-interface-mac-plugin.h +++ b/src/mesh/model/mesh-wifi-interface-mac-plugin.h @@ -31,7 +31,10 @@ class MeshWifiInterfaceMacPlugin : public SimpleRefCount class PropagationCache { public: - PropagationCache(){}; - ~PropagationCache(){}; + PropagationCache() + { + } + + ~PropagationCache() + { + } /** * Get the model associated with the path @@ -89,7 +94,10 @@ class PropagationCache uint32_t modelUid) : m_srcMobility(a), m_dstMobility(b), - m_spectrumModelUid(modelUid){}; + m_spectrumModelUid(modelUid) + { + } + Ptr m_srcMobility; //!< 1st node mobility model Ptr m_dstMobility; //!< 2nd node mobility model uint32_t m_spectrumModelUid; //!< model UID diff --git a/src/test/traced/traced-callback-typedef-test-suite.cc b/src/test/traced/traced-callback-typedef-test-suite.cc index 02449ba8a..f54be97ba 100644 --- a/src/test/traced/traced-callback-typedef-test-suite.cc +++ b/src/test/traced/traced-callback-typedef-test-suite.cc @@ -268,8 +268,13 @@ class TracedCallbackTypedefTestCase::Checker : public Object TracedCallback m_cb; public: - Checker(){}; - ~Checker() override{}; + Checker() + { + } + + ~Checker() override + { + } /// Arguments of the TracedCallback. std::tuple>...> m_items; diff --git a/src/wifi/model/wifi-remote-station-manager.h b/src/wifi/model/wifi-remote-station-manager.h index 31077fb01..dda15d34b 100644 --- a/src/wifi/model/wifi-remote-station-manager.h +++ b/src/wifi/model/wifi-remote-station-manager.h @@ -57,7 +57,10 @@ struct RxSignalInfo; */ struct WifiRemoteStation { - virtual ~WifiRemoteStation(){}; + virtual ~WifiRemoteStation() + { + } + WifiRemoteStationState* m_state; //!< Remote station state std::pair m_rssiAndUpdateTimePair; //!< RSSI of the most recent packet received from