diff --git a/examples/stats/wifi-example-apps.cc b/examples/stats/wifi-example-apps.cc index a4a9c4df6..cb2d0a33a 100644 --- a/examples/stats/wifi-example-apps.cc +++ b/examples/stats/wifi-example-apps.cc @@ -40,7 +40,7 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("WiFiDistanceApps"); TypeId -Sender::GetTypeId (void) +Sender::GetTypeId () { static TypeId tid = TypeId ("Sender") .SetParent () @@ -86,7 +86,7 @@ Sender::~Sender() } void -Sender::DoDispose (void) +Sender::DoDispose () { NS_LOG_FUNCTION_NOARGS (); @@ -155,7 +155,7 @@ void Sender::SendPacket () //-- Receiver //------------------------------------------------------ TypeId -Receiver::GetTypeId (void) +Receiver::GetTypeId () { static TypeId tid = TypeId ("Receiver") .SetParent () @@ -182,7 +182,7 @@ Receiver::~Receiver() } void -Receiver::DoDispose (void) +Receiver::DoDispose () { NS_LOG_FUNCTION_NOARGS (); @@ -276,7 +276,7 @@ Receiver::Receive (Ptr socket) //-- TimestampTag //------------------------------------------------------ TypeId -TimestampTag::GetTypeId (void) +TimestampTag::GetTypeId () { static TypeId tid = TypeId ("TimestampTag") .SetParent () @@ -290,13 +290,13 @@ TimestampTag::GetTypeId (void) return tid; } TypeId -TimestampTag::GetInstanceTypeId (void) const +TimestampTag::GetInstanceTypeId () const { return GetTypeId (); } uint32_t -TimestampTag::GetSerializedSize (void) const +TimestampTag::GetSerializedSize () const { return 8; } @@ -320,7 +320,7 @@ TimestampTag::SetTimestamp (Time time) m_timestamp = time; } Time -TimestampTag::GetTimestamp (void) const +TimestampTag::GetTimestamp () const { return m_timestamp; } diff --git a/examples/stats/wifi-example-apps.h b/examples/stats/wifi-example-apps.h index 58a084bd5..b855a9ed3 100644 --- a/examples/stats/wifi-example-apps.h +++ b/examples/stats/wifi-example-apps.h @@ -42,16 +42,16 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); Sender(); virtual ~Sender(); protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: - virtual void StartApplication (void); - virtual void StopApplication (void); + virtual void StartApplication (); + virtual void StopApplication (); /** * Send a packet. @@ -85,7 +85,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); Receiver(); virtual ~Receiver(); @@ -102,11 +102,11 @@ public: void SetDelayTracker (Ptr delay); protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: - virtual void StartApplication (void); - virtual void StopApplication (void); + virtual void StartApplication (); + virtual void StopApplication (); /** * Receive a packet. @@ -137,10 +137,10 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); - virtual TypeId GetInstanceTypeId (void) const; + static TypeId GetTypeId (); + virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize (void) const; + virtual uint32_t GetSerializedSize () const; virtual void Serialize (TagBuffer i) const; virtual void Deserialize (TagBuffer i); @@ -153,7 +153,7 @@ public: * Get the timestamp. * \return the timestamp. */ - Time GetTimestamp (void) const; + Time GetTimestamp () const; void Print (std::ostream &os) const; diff --git a/examples/tcp/dctcp-example.cc b/examples/tcp/dctcp-example.cc index 1c5daa14b..7f2b6e627 100644 --- a/examples/tcp/dctcp-example.cc +++ b/examples/tcp/dctcp-example.cc @@ -141,7 +141,7 @@ TraceS3R1Sink (std::size_t index, Ptr p, const Address& a) } void -InitializeCounters (void) +InitializeCounters () { for (std::size_t i = 0; i < 10; i++) { diff --git a/examples/tcp/tcp-pacing.cc b/examples/tcp/tcp-pacing.cc index fd6e0daff..37d419aba 100644 --- a/examples/tcp/tcp-pacing.cc +++ b/examples/tcp/tcp-pacing.cc @@ -133,7 +133,7 @@ RxTracer (Ptr p, Ptr ipv4, uint32_t interface) } void -ConnectSocketTraces (void) +ConnectSocketTraces () { Config::ConnectWithoutContext ("/NodeList/0/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow", MakeCallback (&CwndTracer)); Config::ConnectWithoutContext ("/NodeList/0/$ns3::TcpL4Protocol/SocketList/0/PacingRate", MakeCallback (&PacingRateTracer)); diff --git a/examples/tcp/tcp-validation.cc b/examples/tcp/tcp-validation.cc index 53dcd160a..866ea3df0 100644 --- a/examples/tcp/tcp-validation.cc +++ b/examples/tcp/tcp-validation.cc @@ -545,7 +545,7 @@ ScheduleSecondDctcpTraceConnection (std::ofstream* ofStream) * Schedule trace connection. */ void -ScheduleFirstPacketSinkConnection (void) +ScheduleFirstPacketSinkConnection () { Config::ConnectWithoutContextFailSafe ("/NodeList/6/ApplicationList/*/$ns3::PacketSink/Rx", MakeCallback (&TraceFirstRx)); } @@ -576,7 +576,7 @@ ScheduleSecondTcpRttTraceConnection (std::ofstream* ofStream) * Schedule trace connection. */ void -ScheduleSecondPacketSinkConnection (void) +ScheduleSecondPacketSinkConnection () { Config::ConnectWithoutContext ("/NodeList/7/ApplicationList/*/$ns3::PacketSink/Rx", MakeCallback (&TraceSecondRx)); } diff --git a/examples/tutorial/fourth.cc b/examples/tutorial/fourth.cc index 59d1fdb90..dcc5fbda3 100644 --- a/examples/tutorial/fourth.cc +++ b/examples/tutorial/fourth.cc @@ -34,7 +34,7 @@ public: * Register this type. * \return The TypeId. */ - static TypeId GetTypeId (void) + static TypeId GetTypeId () { static TypeId tid = TypeId ("MyObject") .SetParent () diff --git a/examples/tutorial/tutorial-app.cc b/examples/tutorial/tutorial-app.cc index caece9f41..89bfcfcbc 100644 --- a/examples/tutorial/tutorial-app.cc +++ b/examples/tutorial/tutorial-app.cc @@ -37,7 +37,7 @@ TutorialApp::~TutorialApp () } /* static */ -TypeId TutorialApp::GetTypeId (void) +TypeId TutorialApp::GetTypeId () { static TypeId tid = TypeId ("TutorialApp") .SetParent () @@ -58,7 +58,7 @@ TutorialApp::Setup (Ptr socket, Address address, uint32_t packetSize, ui } void -TutorialApp::StartApplication (void) +TutorialApp::StartApplication () { m_running = true; m_packetsSent = 0; @@ -68,7 +68,7 @@ TutorialApp::StartApplication (void) } void -TutorialApp::StopApplication (void) +TutorialApp::StopApplication () { m_running = false; @@ -84,7 +84,7 @@ TutorialApp::StopApplication (void) } void -TutorialApp::SendPacket (void) +TutorialApp::SendPacket () { Ptr packet = Create (m_packetSize); m_socket->Send (packet); @@ -96,7 +96,7 @@ TutorialApp::SendPacket (void) } void -TutorialApp::ScheduleTx (void) +TutorialApp::ScheduleTx () { if (m_running) { diff --git a/examples/tutorial/tutorial-app.h b/examples/tutorial/tutorial-app.h index 15ef30b9e..c676c634c 100644 --- a/examples/tutorial/tutorial-app.h +++ b/examples/tutorial/tutorial-app.h @@ -38,7 +38,7 @@ public: * Register this type. * \return The TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * Setup the socket. @@ -51,13 +51,13 @@ public: void Setup (Ptr socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate); private: - virtual void StartApplication (void); - virtual void StopApplication (void); + virtual void StartApplication (); + virtual void StopApplication (); /// Schedule a new transmission. - void ScheduleTx (void); + void ScheduleTx (); /// Send a packet. - void SendPacket (void); + void SendPacket (); Ptr m_socket; //!< The tranmission socket. Address m_peer; //!< The destination address. diff --git a/src/antenna/model/angles.cc b/src/antenna/model/angles.cc index d69f9d814..54ec1588d 100644 --- a/src/antenna/model/angles.cc +++ b/src/antenna/model/angles.cc @@ -221,21 +221,21 @@ Angles::SetInclination (double inclination) double -Angles::GetAzimuth (void) const +Angles::GetAzimuth () const { return m_azimuth; } double -Angles::GetInclination (void) const +Angles::GetInclination () const { return m_inclination; } void -Angles::NormalizeAngles (void) +Angles::NormalizeAngles () { CheckIfValid (); @@ -250,7 +250,7 @@ Angles::NormalizeAngles (void) void -Angles::CheckIfValid (void) const +Angles::CheckIfValid () const { if (std::isfinite (m_inclination) || std::isfinite (m_azimuth)) { diff --git a/src/antenna/model/angles.h b/src/antenna/model/angles.h index 355e236ea..7f194c8c6 100644 --- a/src/antenna/model/angles.h +++ b/src/antenna/model/angles.h @@ -168,14 +168,14 @@ public: * * \return azimuth angle in radians */ - double GetAzimuth (void) const; + double GetAzimuth () const; /** * Getter for inclination angle * * \return inclination angle in radians */ - double GetInclination (void) const; + double GetInclination () const; // friend methods /** @@ -212,14 +212,14 @@ private: * and can be wrapped in [-M_PI, M_PI), an inclination angle outside * the [0, M_PI] range can be ambiguos and is thus not valid. */ - void NormalizeAngles (void); + void NormalizeAngles (); /** * Check if Angle is valid or not * Warns the user if the Angle is undefined (non-finite azimuth or inclination), * throws an assert if the inclination angle is invalid (not in [0, M_PI]) */ - void CheckIfValid (void) const; + void CheckIfValid () const; double m_azimuth; //!< the azimuth angle in radians diff --git a/src/antenna/model/cosine-antenna-model.h b/src/antenna/model/cosine-antenna-model.h index 02bc4c577..914456ae3 100644 --- a/src/antenna/model/cosine-antenna-model.h +++ b/src/antenna/model/cosine-antenna-model.h @@ -63,19 +63,19 @@ public: * Get the vertical 3 dB beamwidth of the cosine antenna model. * \return the vertical beamwidth in degrees */ - double GetVerticalBeamwidth (void) const; + double GetVerticalBeamwidth () const; /** * Get the horizontal 3 dB beamwidth of the cosine antenna model. * \return the horizontal beamwidth in degrees */ - double GetHorizontalBeamwidth (void) const; + double GetHorizontalBeamwidth () const; /** * Get the horizontal orientation of the antenna element. * \return the horizontal orientation in degrees */ - double GetOrientation (void) const; + double GetOrientation () const; private: diff --git a/src/antenna/model/phased-array-model.h b/src/antenna/model/phased-array-model.h index 9993d915d..095de807c 100644 --- a/src/antenna/model/phased-array-model.h +++ b/src/antenna/model/phased-array-model.h @@ -38,20 +38,20 @@ public: /** * Constructor */ - PhasedArrayModel (void); + PhasedArrayModel (); /** * Destructor */ - virtual ~PhasedArrayModel (void); + virtual ~PhasedArrayModel (); /** * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); typedef std::vector > ComplexVector; //!< type definition for complex vectors @@ -80,7 +80,7 @@ public: * Returns the number of antenna elements * \return the number of antenna elements */ - virtual uint64_t GetNumberOfElements (void) const = 0; + virtual uint64_t GetNumberOfElements () const = 0; /** @@ -94,7 +94,7 @@ public: * Returns the beamforming vector that is currently being used * \return the current beamforming vector */ - ComplexVector GetBeamformingVector (void) const; + ComplexVector GetBeamformingVector () const; /** @@ -124,7 +124,7 @@ public: * Returns a pointer to the AntennaModel instance used to model the elements of the array * \return pointer to the AntennaModel instance */ - Ptr GetAntennaElement (void) const; + Ptr GetAntennaElement () const; /** * Returns the ID of this antenna array instance diff --git a/src/antenna/model/three-gpp-antenna-model.cc b/src/antenna/model/three-gpp-antenna-model.cc index 407a08b36..b99a9bcc3 100644 --- a/src/antenna/model/three-gpp-antenna-model.cc +++ b/src/antenna/model/three-gpp-antenna-model.cc @@ -42,7 +42,7 @@ ThreeGppAntennaModel::GetTypeId () return tid; } -ThreeGppAntennaModel::ThreeGppAntennaModel (void) +ThreeGppAntennaModel::ThreeGppAntennaModel () : m_verticalBeamwidthDegrees {65}, m_horizontalBeamwidthDegrees {65}, m_aMax {30}, @@ -51,7 +51,7 @@ ThreeGppAntennaModel::ThreeGppAntennaModel (void) {} -ThreeGppAntennaModel::~ThreeGppAntennaModel (void) +ThreeGppAntennaModel::~ThreeGppAntennaModel () {} diff --git a/src/antenna/model/three-gpp-antenna-model.h b/src/antenna/model/three-gpp-antenna-model.h index 61ad64824..f4e498d40 100644 --- a/src/antenna/model/three-gpp-antenna-model.h +++ b/src/antenna/model/three-gpp-antenna-model.h @@ -35,8 +35,8 @@ namespace ns3 { class ThreeGppAntennaModel : public AntennaModel { public: - ThreeGppAntennaModel (void); - virtual ~ThreeGppAntennaModel (void) override; + ThreeGppAntennaModel (); + virtual ~ThreeGppAntennaModel () override; /** * \brief Get the type ID. diff --git a/src/antenna/model/uniform-planar-array.cc b/src/antenna/model/uniform-planar-array.cc index 9e79884e5..056527e9e 100644 --- a/src/antenna/model/uniform-planar-array.cc +++ b/src/antenna/model/uniform-planar-array.cc @@ -39,7 +39,7 @@ UniformPlanarArray::~UniformPlanarArray () {} TypeId -UniformPlanarArray::GetTypeId (void) +UniformPlanarArray::GetTypeId () { static TypeId tid = TypeId ("ns3::UniformPlanarArray") .SetParent () @@ -102,7 +102,7 @@ UniformPlanarArray::SetNumColumns (uint32_t n) uint32_t -UniformPlanarArray::GetNumColumns (void) const +UniformPlanarArray::GetNumColumns () const { return m_numColumns; } @@ -121,7 +121,7 @@ UniformPlanarArray::SetNumRows (uint32_t n) uint32_t -UniformPlanarArray::GetNumRows (void) const +UniformPlanarArray::GetNumRows () const { return m_numRows; } @@ -165,7 +165,7 @@ UniformPlanarArray::SetAntennaHorizontalSpacing (double s) double -UniformPlanarArray::GetAntennaHorizontalSpacing (void) const +UniformPlanarArray::GetAntennaHorizontalSpacing () const { return m_disH; } @@ -186,7 +186,7 @@ UniformPlanarArray::SetAntennaVerticalSpacing (double s) double -UniformPlanarArray::GetAntennaVerticalSpacing (void) const +UniformPlanarArray::GetAntennaVerticalSpacing () const { return m_disV; } diff --git a/src/antenna/model/uniform-planar-array.h b/src/antenna/model/uniform-planar-array.h index ae975f335..d7981179a 100644 --- a/src/antenna/model/uniform-planar-array.h +++ b/src/antenna/model/uniform-planar-array.h @@ -41,19 +41,19 @@ public: /** * Constructor */ - UniformPlanarArray (void); + UniformPlanarArray (); /** * Destructor */ - virtual ~UniformPlanarArray (void); + virtual ~UniformPlanarArray (); /** * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** @@ -87,7 +87,7 @@ public: * Returns the number of antenna elements * \return the number of antenna elements */ - uint64_t GetNumberOfElements (void) const override; + uint64_t GetNumberOfElements () const override; private: /** @@ -103,7 +103,7 @@ private: * Get the number of columns of the phased array * \return the number of columns */ - uint32_t GetNumColumns (void) const; + uint32_t GetNumColumns () const; /** @@ -119,7 +119,7 @@ private: * Get the number of rows of the phased array * \return the number of rows */ - uint32_t GetNumRows (void) const; + uint32_t GetNumRows () const; /** * \brief Set the bearing angle @@ -158,7 +158,7 @@ private: * Get the horizontal spacing for the antenna elements of the phased array * \return the horizontal spacing in multiples of wavelength */ - double GetAntennaHorizontalSpacing (void) const; + double GetAntennaHorizontalSpacing () const; /** @@ -174,7 +174,7 @@ private: * Get the vertical spacing for the antenna elements of the phased array * \return the vertical spacing in multiples of wavelength */ - double GetAntennaVerticalSpacing (void) const; + double GetAntennaVerticalSpacing () const; uint32_t m_numColumns {1}; //!< number of columns uint32_t m_numRows {1}; //!< number of rows diff --git a/src/antenna/test/test-angles.cc b/src/antenna/test/test-angles.cc index eeeb6dfea..1c0938031 100644 --- a/src/antenna/test/test-angles.cc +++ b/src/antenna/test/test-angles.cc @@ -50,7 +50,7 @@ public: OneVectorConstructorTestCase (Vector v, Angles a); private: - virtual void DoRun (void); + virtual void DoRun (); Vector m_v; //!< vector Angles m_a; //!< expected angle @@ -104,7 +104,7 @@ public: TwoVectorsConstructorTestCase (Vector v, Vector o, Angles a); private: - virtual void DoRun (void); + virtual void DoRun (); Vector m_v; //!< point Vector m_o; //!< origin diff --git a/src/antenna/test/test-cosine-antenna.cc b/src/antenna/test/test-cosine-antenna.cc index 60f58f083..fbc30dc45 100644 --- a/src/antenna/test/test-cosine-antenna.cc +++ b/src/antenna/test/test-cosine-antenna.cc @@ -73,7 +73,7 @@ public: private: - virtual void DoRun (void); + virtual void DoRun (); Angles m_a; //!< Antenna angle double m_b; //!< Horizontal and Vertical Beamwidth double m_o; //!< Orientation diff --git a/src/antenna/test/test-degrees-radians.cc b/src/antenna/test/test-degrees-radians.cc index d99b07341..fa6b3dc9a 100644 --- a/src/antenna/test/test-degrees-radians.cc +++ b/src/antenna/test/test-degrees-radians.cc @@ -51,7 +51,7 @@ public: private: - virtual void DoRun (void); + virtual void DoRun (); double m_a; //!< angle in degrees double m_b; //!< expected angle in radians @@ -104,7 +104,7 @@ public: private: - virtual void DoRun (void); + virtual void DoRun (); double m_a; //!< angle in radians double m_b; //!< expected angle in degrees diff --git a/src/antenna/test/test-isotropic-antenna.cc b/src/antenna/test/test-isotropic-antenna.cc index 136c534a1..6ad638e52 100644 --- a/src/antenna/test/test-isotropic-antenna.cc +++ b/src/antenna/test/test-isotropic-antenna.cc @@ -51,7 +51,7 @@ public: private: - virtual void DoRun (void); + virtual void DoRun (); Angles m_a; //!< Antenna angle double m_expectedGain; //!< Expected gain diff --git a/src/antenna/test/test-parabolic-antenna.cc b/src/antenna/test/test-parabolic-antenna.cc index 257db37ad..e00e782b3 100644 --- a/src/antenna/test/test-parabolic-antenna.cc +++ b/src/antenna/test/test-parabolic-antenna.cc @@ -73,7 +73,7 @@ public: private: - virtual void DoRun (void); + virtual void DoRun (); Angles m_a; //!< Antenna angle double m_b; //!< Beamwidth diff --git a/src/antenna/test/test-uniform-planar-array.cc b/src/antenna/test/test-uniform-planar-array.cc index b59c6f904..ba7a79abd 100644 --- a/src/antenna/test/test-uniform-planar-array.cc +++ b/src/antenna/test/test-uniform-planar-array.cc @@ -76,7 +76,7 @@ private: /** * Run the test */ - virtual void DoRun (void); + virtual void DoRun (); /** * Compute the gain of the antenna array * \param a the antenna array diff --git a/src/aodv/helper/aodv-helper.cc b/src/aodv/helper/aodv-helper.cc index 1381e6409..a3d8faf47 100644 --- a/src/aodv/helper/aodv-helper.cc +++ b/src/aodv/helper/aodv-helper.cc @@ -34,7 +34,7 @@ AodvHelper::AodvHelper() : } AodvHelper* -AodvHelper::Copy (void) const +AodvHelper::Copy () const { return new AodvHelper (*this); } diff --git a/src/aodv/helper/aodv-helper.h b/src/aodv/helper/aodv-helper.h index bf83cc59c..a253dfd67 100644 --- a/src/aodv/helper/aodv-helper.h +++ b/src/aodv/helper/aodv-helper.h @@ -43,7 +43,7 @@ public: * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - AodvHelper* Copy (void) const; + AodvHelper* Copy () const; /** * \param node the node on which the routing protocol will run diff --git a/src/aodv/model/aodv-routing-protocol.cc b/src/aodv/model/aodv-routing-protocol.cc index 1731c65bb..c10167f13 100644 --- a/src/aodv/model/aodv-routing-protocol.cc +++ b/src/aodv/model/aodv-routing-protocol.cc @@ -180,7 +180,7 @@ RoutingProtocol::RoutingProtocol () } TypeId -RoutingProtocol::GetTypeId (void) +RoutingProtocol::GetTypeId () { static TypeId tid = TypeId ("ns3::aodv::RoutingProtocol") .SetParent () @@ -2184,7 +2184,7 @@ RoutingProtocol::FindSubnetBroadcastSocketWithInterfaceAddress (Ipv4InterfaceAdd } void -RoutingProtocol::DoInitialize (void) +RoutingProtocol::DoInitialize () { NS_LOG_FUNCTION (this); uint32_t startTime; diff --git a/src/aodv/model/aodv-routing-protocol.h b/src/aodv/model/aodv-routing-protocol.h index 5e14c11fb..aebc9d45b 100644 --- a/src/aodv/model/aodv-routing-protocol.h +++ b/src/aodv/model/aodv-routing-protocol.h @@ -59,7 +59,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); static const uint32_t AODV_PORT; /// constructor @@ -182,7 +182,7 @@ public: int64_t AssignStreams (int64_t stream); protected: - virtual void DoInitialize (void); + virtual void DoInitialize (); private: /** * Notify that an MPDU was dropped. diff --git a/src/applications/helper/udp-client-server-helper.cc b/src/applications/helper/udp-client-server-helper.cc index fa4618fbb..68182b834 100644 --- a/src/applications/helper/udp-client-server-helper.cc +++ b/src/applications/helper/udp-client-server-helper.cc @@ -60,7 +60,7 @@ UdpServerHelper::Install (NodeContainer c) } Ptr -UdpServerHelper::GetServer (void) +UdpServerHelper::GetServer () { return m_server; } diff --git a/src/applications/helper/udp-client-server-helper.h b/src/applications/helper/udp-client-server-helper.h index 8a0221309..6e91c8bb4 100644 --- a/src/applications/helper/udp-client-server-helper.h +++ b/src/applications/helper/udp-client-server-helper.h @@ -78,7 +78,7 @@ public: * * \returns a Ptr to the last created server application */ - Ptr GetServer (void); + Ptr GetServer (); private: ObjectFactory m_factory; //!< Object factory. Ptr m_server; //!< The last created server application diff --git a/src/applications/model/bulk-send-application.cc b/src/applications/model/bulk-send-application.cc index 46f07aef1..685db05e0 100644 --- a/src/applications/model/bulk-send-application.cc +++ b/src/applications/model/bulk-send-application.cc @@ -39,7 +39,7 @@ NS_LOG_COMPONENT_DEFINE ("BulkSendApplication"); NS_OBJECT_ENSURE_REGISTERED (BulkSendApplication); TypeId -BulkSendApplication::GetTypeId (void) +BulkSendApplication::GetTypeId () { static TypeId tid = TypeId ("ns3::BulkSendApplication") .SetParent () @@ -108,14 +108,14 @@ BulkSendApplication::SetMaxBytes (uint64_t maxBytes) } Ptr -BulkSendApplication::GetSocket (void) const +BulkSendApplication::GetSocket () const { NS_LOG_FUNCTION (this); return m_socket; } void -BulkSendApplication::DoDispose (void) +BulkSendApplication::DoDispose () { NS_LOG_FUNCTION (this); @@ -126,7 +126,7 @@ BulkSendApplication::DoDispose (void) } // Application Methods -void BulkSendApplication::StartApplication (void) // Called at time specified by Start +void BulkSendApplication::StartApplication () // Called at time specified by Start { NS_LOG_FUNCTION (this); Address from; @@ -185,7 +185,7 @@ void BulkSendApplication::StartApplication (void) // Called at time specified by } } -void BulkSendApplication::StopApplication (void) // Called at time specified by Stop +void BulkSendApplication::StopApplication () // Called at time specified by Stop { NS_LOG_FUNCTION (this); diff --git a/src/applications/model/bulk-send-application.h b/src/applications/model/bulk-send-application.h index 6959d5c69..66d210429 100644 --- a/src/applications/model/bulk-send-application.h +++ b/src/applications/model/bulk-send-application.h @@ -79,7 +79,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); BulkSendApplication (); @@ -104,14 +104,14 @@ public: * \brief Get the socket this application is attached to. * \return pointer to associated socket */ - Ptr GetSocket (void) const; + Ptr GetSocket () const; protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: // inherited from Application base class. - virtual void StartApplication (void); // Called at time specified by Start - virtual void StopApplication (void); // Called at time specified by Stop + virtual void StartApplication (); // Called at time specified by Start + virtual void StopApplication (); // Called at time specified by Stop /** * \brief Send data until the L4 transmission buffer is full. diff --git a/src/applications/model/onoff-application.cc b/src/applications/model/onoff-application.cc index 5900f8eab..668882c65 100644 --- a/src/applications/model/onoff-application.cc +++ b/src/applications/model/onoff-application.cc @@ -50,7 +50,7 @@ NS_LOG_COMPONENT_DEFINE ("OnOffApplication"); NS_OBJECT_ENSURE_REGISTERED (OnOffApplication); TypeId -OnOffApplication::GetTypeId (void) +OnOffApplication::GetTypeId () { static TypeId tid = TypeId ("ns3::OnOffApplication") .SetParent () @@ -137,7 +137,7 @@ OnOffApplication::SetMaxBytes (uint64_t maxBytes) } Ptr -OnOffApplication::GetSocket (void) const +OnOffApplication::GetSocket () const { NS_LOG_FUNCTION (this); return m_socket; @@ -153,7 +153,7 @@ OnOffApplication::AssignStreams (int64_t stream) } void -OnOffApplication::DoDispose (void) +OnOffApplication::DoDispose () { NS_LOG_FUNCTION (this); diff --git a/src/applications/model/onoff-application.h b/src/applications/model/onoff-application.h index a8f0335fb..e9b1fe5b7 100644 --- a/src/applications/model/onoff-application.h +++ b/src/applications/model/onoff-application.h @@ -99,7 +99,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); OnOffApplication (); @@ -119,7 +119,7 @@ public: * \brief Return a pointer to associated socket. * \return pointer to associated socket */ - Ptr GetSocket (void) const; + Ptr GetSocket () const; /** * \brief Assign a fixed random variable stream number to the random variables @@ -131,11 +131,11 @@ public: int64_t AssignStreams (int64_t stream); protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: // inherited from Application base class. - virtual void StartApplication (void); // Called at time specified by Start - virtual void StopApplication (void); // Called at time specified by Stop + virtual void StartApplication (); // Called at time specified by Start + virtual void StopApplication (); // Called at time specified by Stop //helpers /** diff --git a/src/applications/model/packet-loss-counter.h b/src/applications/model/packet-loss-counter.h index 9228de837..daf4baf31 100644 --- a/src/applications/model/packet-loss-counter.h +++ b/src/applications/model/packet-loss-counter.h @@ -60,12 +60,12 @@ public: * \brief Get the number of lost packets. * \returns the number of lost packets. */ - uint32_t GetLost (void) const; + uint32_t GetLost () const; /** * \brief Return the size of the window used to compute the packet loss. * \return the window size. */ - uint16_t GetBitMapSize (void) const; + uint16_t GetBitMapSize () const; /** * \brief Set the size of the window used to compute the packet loss. * diff --git a/src/applications/model/packet-sink.cc b/src/applications/model/packet-sink.cc index 262c4a542..a46482d55 100644 --- a/src/applications/model/packet-sink.cc +++ b/src/applications/model/packet-sink.cc @@ -42,7 +42,7 @@ NS_LOG_COMPONENT_DEFINE ("PacketSink"); NS_OBJECT_ENSURE_REGISTERED (PacketSink); TypeId -PacketSink::GetTypeId (void) +PacketSink::GetTypeId () { static TypeId tid = TypeId ("ns3::PacketSink") .SetParent () @@ -97,20 +97,20 @@ uint64_t PacketSink::GetTotalRx () const } Ptr -PacketSink::GetListeningSocket (void) const +PacketSink::GetListeningSocket () const { NS_LOG_FUNCTION (this); return m_socket; } std::list > -PacketSink::GetAcceptedSockets (void) const +PacketSink::GetAcceptedSockets () const { NS_LOG_FUNCTION (this); return m_socketList; } -void PacketSink::DoDispose (void) +void PacketSink::DoDispose () { NS_LOG_FUNCTION (this); m_socket = 0; diff --git a/src/applications/model/packet-sink.h b/src/applications/model/packet-sink.h index 9b143a06d..45a2e187c 100644 --- a/src/applications/model/packet-sink.h +++ b/src/applications/model/packet-sink.h @@ -76,7 +76,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); PacketSink (); virtual ~PacketSink (); @@ -89,12 +89,12 @@ public: /** * \return pointer to listening socket */ - Ptr GetListeningSocket (void) const; + Ptr GetListeningSocket () const; /** * \return list of pointers to accepted sockets */ - std::list > GetAcceptedSockets (void) const; + std::list > GetAcceptedSockets () const; /** * TracedCallback signature for a reception with addresses and SeqTsSizeHeader @@ -108,11 +108,11 @@ public: const SeqTsSizeHeader &header); protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: // inherited from Application base class. - virtual void StartApplication (void); // Called at time specified by Start - virtual void StopApplication (void); // Called at time specified by Stop + virtual void StartApplication (); // Called at time specified by Start + virtual void StopApplication (); // Called at time specified by Stop /** * \brief Handle a packet received by the application diff --git a/src/applications/model/seq-ts-echo-header.cc b/src/applications/model/seq-ts-echo-header.cc index 0a8e3188a..5f14094ef 100644 --- a/src/applications/model/seq-ts-echo-header.cc +++ b/src/applications/model/seq-ts-echo-header.cc @@ -47,7 +47,7 @@ SeqTsEchoHeader::SetSeq (uint32_t seq) } uint32_t -SeqTsEchoHeader::GetSeq (void) const +SeqTsEchoHeader::GetSeq () const { NS_LOG_FUNCTION (this); return m_seq; @@ -61,7 +61,7 @@ SeqTsEchoHeader::SetTsValue (Time ts) } Time -SeqTsEchoHeader::GetTsValue (void) const +SeqTsEchoHeader::GetTsValue () const { NS_LOG_FUNCTION (this); return m_tsValue; @@ -75,14 +75,14 @@ SeqTsEchoHeader::SetTsEchoReply (Time ts) } Time -SeqTsEchoHeader::GetTsEchoReply (void) const +SeqTsEchoHeader::GetTsEchoReply () const { NS_LOG_FUNCTION (this); return m_tsEchoReply; } TypeId -SeqTsEchoHeader::GetTypeId (void) +SeqTsEchoHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::SeqTsEchoHeader") .SetParent
() @@ -93,7 +93,7 @@ SeqTsEchoHeader::GetTypeId (void) } TypeId -SeqTsEchoHeader::GetInstanceTypeId (void) const +SeqTsEchoHeader::GetInstanceTypeId () const { return GetTypeId (); } @@ -106,7 +106,7 @@ SeqTsEchoHeader::Print (std::ostream &os) const } uint32_t -SeqTsEchoHeader::GetSerializedSize (void) const +SeqTsEchoHeader::GetSerializedSize () const { NS_LOG_FUNCTION (this); return 4+8+8; diff --git a/src/applications/model/seq-ts-echo-header.h b/src/applications/model/seq-ts-echo-header.h index 66dbd17b7..468279472 100644 --- a/src/applications/model/seq-ts-echo-header.h +++ b/src/applications/model/seq-ts-echo-header.h @@ -41,7 +41,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief constructor @@ -56,17 +56,17 @@ public: /** * \return the sequence number */ - uint32_t GetSeq (void) const; + uint32_t GetSeq () const; /** * \return A time value set by the sender */ - Time GetTsValue (void) const; + Time GetTsValue () const; /** * \return A time value echoing the received timestamp */ - Time GetTsEchoReply (void) const; + Time GetTsEchoReply () const; /** * \brief Set the sender's time value @@ -82,9 +82,9 @@ public: void SetTsEchoReply (Time ts); // Inherited - virtual TypeId GetInstanceTypeId (void) const override; + virtual TypeId GetInstanceTypeId () const override; virtual void Print (std::ostream &os) const override; - virtual uint32_t GetSerializedSize (void) const override; + virtual uint32_t GetSerializedSize () const override; virtual void Serialize (Buffer::Iterator start) const override; virtual uint32_t Deserialize (Buffer::Iterator start) override; diff --git a/src/applications/model/seq-ts-header.cc b/src/applications/model/seq-ts-header.cc index 90945c0ff..6b5d90a3c 100644 --- a/src/applications/model/seq-ts-header.cc +++ b/src/applications/model/seq-ts-header.cc @@ -44,21 +44,21 @@ SeqTsHeader::SetSeq (uint32_t seq) m_seq = seq; } uint32_t -SeqTsHeader::GetSeq (void) const +SeqTsHeader::GetSeq () const { NS_LOG_FUNCTION (this); return m_seq; } Time -SeqTsHeader::GetTs (void) const +SeqTsHeader::GetTs () const { NS_LOG_FUNCTION (this); return TimeStep (m_ts); } TypeId -SeqTsHeader::GetTypeId (void) +SeqTsHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::SeqTsHeader") .SetParent
() @@ -68,7 +68,7 @@ SeqTsHeader::GetTypeId (void) return tid; } TypeId -SeqTsHeader::GetInstanceTypeId (void) const +SeqTsHeader::GetInstanceTypeId () const { return GetTypeId (); } @@ -79,7 +79,7 @@ SeqTsHeader::Print (std::ostream &os) const os << "(seq=" << m_seq << " time=" << TimeStep (m_ts).As (Time::S) << ")"; } uint32_t -SeqTsHeader::GetSerializedSize (void) const +SeqTsHeader::GetSerializedSize () const { NS_LOG_FUNCTION (this); return 4+8; diff --git a/src/applications/model/seq-ts-header.h b/src/applications/model/seq-ts-header.h index d9f70e754..e48c1facc 100644 --- a/src/applications/model/seq-ts-header.h +++ b/src/applications/model/seq-ts-header.h @@ -53,21 +53,21 @@ public: /** * \return the sequence number */ - uint32_t GetSeq (void) const; + uint32_t GetSeq () const; /** * \return the time stamp */ - Time GetTs (void) const; + Time GetTs () const; /** * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId (void) const; + virtual TypeId GetInstanceTypeId () const; virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize (void) const; + virtual uint32_t GetSerializedSize () const; virtual void Serialize (Buffer::Iterator start) const; virtual uint32_t Deserialize (Buffer::Iterator start); diff --git a/src/applications/model/seq-ts-size-header.cc b/src/applications/model/seq-ts-size-header.cc index a25955603..829d9346e 100644 --- a/src/applications/model/seq-ts-size-header.cc +++ b/src/applications/model/seq-ts-size-header.cc @@ -35,7 +35,7 @@ SeqTsSizeHeader::SeqTsSizeHeader () } TypeId -SeqTsSizeHeader::GetTypeId (void) +SeqTsSizeHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::SeqTsSizeHeader") .SetParent () @@ -46,7 +46,7 @@ SeqTsSizeHeader::GetTypeId (void) } TypeId -SeqTsSizeHeader::GetInstanceTypeId (void) const +SeqTsSizeHeader::GetInstanceTypeId () const { return GetTypeId (); } @@ -58,7 +58,7 @@ SeqTsSizeHeader::SetSize (uint64_t size) } uint64_t -SeqTsSizeHeader::GetSize (void) const +SeqTsSizeHeader::GetSize () const { return m_size; } @@ -72,7 +72,7 @@ SeqTsSizeHeader::Print (std::ostream &os) const } uint32_t -SeqTsSizeHeader::GetSerializedSize (void) const +SeqTsSizeHeader::GetSerializedSize () const { return SeqTsHeader::GetSerializedSize () + 8; } diff --git a/src/applications/model/seq-ts-size-header.h b/src/applications/model/seq-ts-size-header.h index 4b5fa49e5..159a4222b 100644 --- a/src/applications/model/seq-ts-size-header.h +++ b/src/applications/model/seq-ts-size-header.h @@ -41,7 +41,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief constructor @@ -58,12 +58,12 @@ public: * \brief Get the size information that the header is carrying * \return the size */ - uint64_t GetSize (void) const; + uint64_t GetSize () const; // Inherited - virtual TypeId GetInstanceTypeId (void) const override; + virtual TypeId GetInstanceTypeId () const override; virtual void Print (std::ostream &os) const override; - virtual uint32_t GetSerializedSize (void) const override; + virtual uint32_t GetSerializedSize () const override; virtual void Serialize (Buffer::Iterator start) const override; virtual uint32_t Deserialize (Buffer::Iterator start) override; diff --git a/src/applications/model/three-gpp-http-variables.cc b/src/applications/model/three-gpp-http-variables.cc index c9864aca7..ecf541a63 100644 --- a/src/applications/model/three-gpp-http-variables.cc +++ b/src/applications/model/three-gpp-http-variables.cc @@ -340,7 +340,7 @@ ThreeGppHttpVariables::AssignStreams (int64_t stream) } void -ThreeGppHttpVariables::DoInitialize (void) +ThreeGppHttpVariables::DoInitialize () { NS_LOG_FUNCTION (this); UpdateMainObjectMuAndSigma (); @@ -368,7 +368,7 @@ ThreeGppHttpVariables::SetMainObjectGenerationDelay (Time constant) } void -ThreeGppHttpVariables::UpdateMainObjectMuAndSigma (void) +ThreeGppHttpVariables::UpdateMainObjectMuAndSigma () { NS_LOG_FUNCTION (this); const double a1 = std::pow (m_mainObjectSizeStdDev, 2.0); @@ -382,7 +382,7 @@ ThreeGppHttpVariables::UpdateMainObjectMuAndSigma (void) } void -ThreeGppHttpVariables::UpdateEmbeddedObjectMuAndSigma (void) +ThreeGppHttpVariables::UpdateEmbeddedObjectMuAndSigma () { NS_LOG_FUNCTION (this); const double a1 = std::pow (m_embeddedObjectSizeStdDev, 2.0); diff --git a/src/applications/model/three-gpp-http-variables.h b/src/applications/model/three-gpp-http-variables.h index 99017626f..f46f1c87d 100644 --- a/src/applications/model/three-gpp-http-variables.h +++ b/src/applications/model/three-gpp-http-variables.h @@ -271,14 +271,14 @@ private: * \brief Upon and after object initialization, update random variable * Mu and Sigma based on changes to attribute values. */ - void UpdateMainObjectMuAndSigma (void); + void UpdateMainObjectMuAndSigma (); /** * \brief Upon and after object initialization, update random variable * Mu and Sigma based on changes to attribute values. */ - void UpdateEmbeddedObjectMuAndSigma (void); + void UpdateEmbeddedObjectMuAndSigma (); - void DoInitialize (void); // overridden from base class + void DoInitialize (); // overridden from base class /** * Random variable for determining MTU size (in bytes). diff --git a/src/applications/model/udp-client.cc b/src/applications/model/udp-client.cc index f27cf0757..e972aa1bb 100644 --- a/src/applications/model/udp-client.cc +++ b/src/applications/model/udp-client.cc @@ -40,7 +40,7 @@ NS_LOG_COMPONENT_DEFINE ("UdpClient"); NS_OBJECT_ENSURE_REGISTERED (UdpClient); TypeId -UdpClient::GetTypeId (void) +UdpClient::GetTypeId () { static TypeId tid = TypeId ("ns3::UdpClient") .SetParent () @@ -103,14 +103,14 @@ UdpClient::SetRemote (Address addr) } void -UdpClient::DoDispose (void) +UdpClient::DoDispose () { NS_LOG_FUNCTION (this); Application::DoDispose (); } void -UdpClient::StartApplication (void) +UdpClient::StartApplication () { NS_LOG_FUNCTION (this); @@ -183,14 +183,14 @@ UdpClient::StartApplication (void) } void -UdpClient::StopApplication (void) +UdpClient::StopApplication () { NS_LOG_FUNCTION (this); Simulator::Cancel (m_sendEvent); } void -UdpClient::Send (void) +UdpClient::Send () { NS_LOG_FUNCTION (this); NS_ASSERT (m_sendEvent.IsExpired ()); diff --git a/src/applications/model/udp-client.h b/src/applications/model/udp-client.h index 1575f05a1..b84eed754 100644 --- a/src/applications/model/udp-client.h +++ b/src/applications/model/udp-client.h @@ -47,7 +47,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); UdpClient (); @@ -71,17 +71,17 @@ public: uint64_t GetTotalTx () const; protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: - virtual void StartApplication (void); - virtual void StopApplication (void); + virtual void StartApplication (); + virtual void StopApplication (); /** * \brief Send a packet */ - void Send (void); + void Send (); uint32_t m_count; //!< Maximum number of packets the application will send Time m_interval; //!< Packet inter-send time diff --git a/src/applications/model/udp-echo-client.cc b/src/applications/model/udp-echo-client.cc index 37fda98d0..52755a316 100644 --- a/src/applications/model/udp-echo-client.cc +++ b/src/applications/model/udp-echo-client.cc @@ -36,7 +36,7 @@ NS_LOG_COMPONENT_DEFINE ("UdpEchoClientApplication"); NS_OBJECT_ENSURE_REGISTERED (UdpEchoClient); TypeId -UdpEchoClient::GetTypeId (void) +UdpEchoClient::GetTypeId () { static TypeId tid = TypeId ("ns3::UdpEchoClient") .SetParent () @@ -119,14 +119,14 @@ UdpEchoClient::SetRemote (Address addr) } void -UdpEchoClient::DoDispose (void) +UdpEchoClient::DoDispose () { NS_LOG_FUNCTION (this); Application::DoDispose (); } void -UdpEchoClient::StartApplication (void) +UdpEchoClient::StartApplication () { NS_LOG_FUNCTION (this); @@ -209,7 +209,7 @@ UdpEchoClient::SetDataSize (uint32_t dataSize) } uint32_t -UdpEchoClient::GetDataSize (void) const +UdpEchoClient::GetDataSize () const { NS_LOG_FUNCTION (this); return m_size; @@ -303,7 +303,7 @@ UdpEchoClient::ScheduleTransmit (Time dt) } void -UdpEchoClient::Send (void) +UdpEchoClient::Send () { NS_LOG_FUNCTION (this); diff --git a/src/applications/model/udp-echo-client.h b/src/applications/model/udp-echo-client.h index c3df15333..6c7f4a5fb 100644 --- a/src/applications/model/udp-echo-client.h +++ b/src/applications/model/udp-echo-client.h @@ -43,7 +43,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); UdpEchoClient (); @@ -84,7 +84,7 @@ public: * * \returns The number of data bytes. */ - uint32_t GetDataSize (void) const; + uint32_t GetDataSize () const; /** * Set the data fill of the packet (what is sent as data to the server) to @@ -131,12 +131,12 @@ public: void SetFill (uint8_t *fill, uint32_t fillSize, uint32_t dataSize); protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: - virtual void StartApplication (void); - virtual void StopApplication (void); + virtual void StartApplication (); + virtual void StopApplication (); /** * \brief Schedule the next packet transmission @@ -146,7 +146,7 @@ private: /** * \brief Send a packet */ - void Send (void); + void Send (); /** * \brief Handle a packet reception. diff --git a/src/applications/model/udp-echo-server.cc b/src/applications/model/udp-echo-server.cc index 38fb1663c..6c2439f10 100644 --- a/src/applications/model/udp-echo-server.cc +++ b/src/applications/model/udp-echo-server.cc @@ -39,7 +39,7 @@ NS_LOG_COMPONENT_DEFINE ("UdpEchoServerApplication"); NS_OBJECT_ENSURE_REGISTERED (UdpEchoServer); TypeId -UdpEchoServer::GetTypeId (void) +UdpEchoServer::GetTypeId () { static TypeId tid = TypeId ("ns3::UdpEchoServer") .SetParent () @@ -72,14 +72,14 @@ UdpEchoServer::~UdpEchoServer() } void -UdpEchoServer::DoDispose (void) +UdpEchoServer::DoDispose () { NS_LOG_FUNCTION (this); Application::DoDispose (); } void -UdpEchoServer::StartApplication (void) +UdpEchoServer::StartApplication () { NS_LOG_FUNCTION (this); diff --git a/src/applications/model/udp-echo-server.h b/src/applications/model/udp-echo-server.h index 9fdca48be..c622932dd 100644 --- a/src/applications/model/udp-echo-server.h +++ b/src/applications/model/udp-echo-server.h @@ -48,17 +48,17 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); UdpEchoServer (); virtual ~UdpEchoServer (); protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: - virtual void StartApplication (void); - virtual void StopApplication (void); + virtual void StartApplication (); + virtual void StopApplication (); /** * \brief Handle a packet reception. diff --git a/src/applications/model/udp-server.cc b/src/applications/model/udp-server.cc index 0a1abccc6..bbd9a0ea1 100644 --- a/src/applications/model/udp-server.cc +++ b/src/applications/model/udp-server.cc @@ -42,7 +42,7 @@ NS_OBJECT_ENSURE_REGISTERED (UdpServer); TypeId -UdpServer::GetTypeId (void) +UdpServer::GetTypeId () { static TypeId tid = TypeId ("ns3::UdpServer") .SetParent () @@ -96,28 +96,28 @@ UdpServer::SetPacketWindowSize (uint16_t size) } uint32_t -UdpServer::GetLost (void) const +UdpServer::GetLost () const { NS_LOG_FUNCTION (this); return m_lossCounter.GetLost (); } uint64_t -UdpServer::GetReceived (void) const +UdpServer::GetReceived () const { NS_LOG_FUNCTION (this); return m_received; } void -UdpServer::DoDispose (void) +UdpServer::DoDispose () { NS_LOG_FUNCTION (this); Application::DoDispose (); } void -UdpServer::StartApplication (void) +UdpServer::StartApplication () { NS_LOG_FUNCTION (this); diff --git a/src/applications/model/udp-server.h b/src/applications/model/udp-server.h index f6a42ae83..cff9997c4 100644 --- a/src/applications/model/udp-server.h +++ b/src/applications/model/udp-server.h @@ -52,20 +52,20 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); UdpServer (); virtual ~UdpServer (); /** * \brief Returns the number of lost packets * \return the number of lost packets */ - uint32_t GetLost (void) const; + uint32_t GetLost () const; /** * \brief Returns the number of received packets * \return the number of received packets */ - uint64_t GetReceived (void) const; + uint64_t GetReceived () const; /** * \brief Returns the size of the window used for checking loss. @@ -81,12 +81,12 @@ public: */ void SetPacketWindowSize (uint16_t size); protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: - virtual void StartApplication (void); - virtual void StopApplication (void); + virtual void StartApplication (); + virtual void StopApplication (); /** * \brief Handle a packet reception. diff --git a/src/applications/model/udp-trace-client.cc b/src/applications/model/udp-trace-client.cc index 8648c19e3..25483e7dc 100644 --- a/src/applications/model/udp-trace-client.cc +++ b/src/applications/model/udp-trace-client.cc @@ -59,7 +59,7 @@ struct UdpTraceClient::TraceEntry UdpTraceClient::g_defaultEntries[] = { }; TypeId -UdpTraceClient::GetTypeId (void) +UdpTraceClient::GetTypeId () { static TypeId tid = TypeId ("ns3::UdpTraceClient") .SetParent () @@ -166,7 +166,7 @@ UdpTraceClient::SetMaxPacketSize (uint16_t maxPacketSize) } -uint16_t UdpTraceClient::GetMaxPacketSize (void) +uint16_t UdpTraceClient::GetMaxPacketSize () { NS_LOG_FUNCTION (this); return m_maxPacketSize; @@ -174,7 +174,7 @@ uint16_t UdpTraceClient::GetMaxPacketSize (void) void -UdpTraceClient::DoDispose (void) +UdpTraceClient::DoDispose () { NS_LOG_FUNCTION (this); Application::DoDispose (); @@ -225,7 +225,7 @@ UdpTraceClient::LoadTrace (std::string filename) } void -UdpTraceClient::LoadDefaultTrace (void) +UdpTraceClient::LoadDefaultTrace () { NS_LOG_FUNCTION (this); uint32_t prevTime = 0; @@ -248,7 +248,7 @@ UdpTraceClient::LoadDefaultTrace (void) } void -UdpTraceClient::StartApplication (void) +UdpTraceClient::StartApplication () { NS_LOG_FUNCTION (this); @@ -352,7 +352,7 @@ UdpTraceClient::SendPacket (uint32_t size) } void -UdpTraceClient::Send (void) +UdpTraceClient::Send () { NS_LOG_FUNCTION (this); diff --git a/src/applications/model/udp-trace-client.h b/src/applications/model/udp-trace-client.h index 03a3afb17..e23b6047f 100644 --- a/src/applications/model/udp-trace-client.h +++ b/src/applications/model/udp-trace-client.h @@ -64,7 +64,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); UdpTraceClient (); @@ -107,7 +107,7 @@ public: * \brief Return the maximum packet size * \return the maximum packet size */ - uint16_t GetMaxPacketSize (void); + uint16_t GetMaxPacketSize (); /** * \brief Set the maximum packet size @@ -122,7 +122,7 @@ public: void SetTraceLoop (bool traceLoop); protected: - virtual void DoDispose (void); + virtual void DoDispose (); private: /** @@ -133,14 +133,14 @@ private: /** * \brief Load the default trace */ - void LoadDefaultTrace (void); - virtual void StartApplication (void); - virtual void StopApplication (void); + void LoadDefaultTrace (); + virtual void StartApplication (); + virtual void StopApplication (); /** * \brief Send a packet */ - void Send (void); + void Send (); /** * \brief Send a packet of a given size * \param size the packet size diff --git a/src/applications/test/bulk-send-application-test-suite.cc b/src/applications/test/bulk-send-application-test-suite.cc index 3a9cc66f9..ef5e4c081 100644 --- a/src/applications/test/bulk-send-application-test-suite.cc +++ b/src/applications/test/bulk-send-application-test-suite.cc @@ -52,7 +52,7 @@ public: virtual ~BulkSendBasicTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); /** * Record a packet successfully sent * \param p the packet @@ -90,7 +90,7 @@ BulkSendBasicTestCase::ReceiveRx (Ptr p, const Address& addr) } void -BulkSendBasicTestCase::DoRun (void) +BulkSendBasicTestCase::DoRun () { Ptr sender = CreateObject (); Ptr receiver = CreateObject (); @@ -148,7 +148,7 @@ public: virtual ~BulkSendSeqTsSizeTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); /** * Record a packet successfully sent * \param p the packet @@ -205,7 +205,7 @@ BulkSendSeqTsSizeTestCase::ReceiveRx (Ptr p, const Address &from, } void -BulkSendSeqTsSizeTestCase::DoRun (void) +BulkSendSeqTsSizeTestCase::DoRun () { Ptr sender = CreateObject (); Ptr receiver = CreateObject (); diff --git a/src/applications/test/udp-client-server-test.cc b/src/applications/test/udp-client-server-test.cc index 0816339b5..887230eab 100644 --- a/src/applications/test/udp-client-server-test.cc +++ b/src/applications/test/udp-client-server-test.cc @@ -56,7 +56,7 @@ public: virtual ~UdpClientServerTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; @@ -69,7 +69,7 @@ UdpClientServerTestCase::~UdpClientServerTestCase () { } -void UdpClientServerTestCase::DoRun (void) +void UdpClientServerTestCase::DoRun () { NodeContainer n; n.Create (2); @@ -130,7 +130,7 @@ public: virtual ~UdpTraceClientServerTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; @@ -143,7 +143,7 @@ UdpTraceClientServerTestCase::~UdpTraceClientServerTestCase () { } -void UdpTraceClientServerTestCase::DoRun (void) +void UdpTraceClientServerTestCase::DoRun () { NodeContainer n; n.Create (2); @@ -199,7 +199,7 @@ public: virtual ~PacketLossCounterTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; @@ -212,7 +212,7 @@ PacketLossCounterTestCase::~PacketLossCounterTestCase () { } -void PacketLossCounterTestCase::DoRun (void) +void PacketLossCounterTestCase::DoRun () { PacketLossCounter lossCounter (32); lossCounter.NotifyReceived (32); //out of order @@ -274,7 +274,7 @@ public: virtual ~UdpEchoClientSetFillTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; @@ -287,7 +287,7 @@ UdpEchoClientSetFillTestCase::~UdpEchoClientSetFillTestCase () { } -void UdpEchoClientSetFillTestCase::DoRun (void) +void UdpEchoClientSetFillTestCase::DoRun () { NodeContainer nodes; nodes.Create (2); diff --git a/src/bridge/model/bridge-channel.cc b/src/bridge/model/bridge-channel.cc index cbc4803f1..1d3a099aa 100644 --- a/src/bridge/model/bridge-channel.cc +++ b/src/bridge/model/bridge-channel.cc @@ -32,7 +32,7 @@ NS_LOG_COMPONENT_DEFINE ("BridgeChannel"); NS_OBJECT_ENSURE_REGISTERED (BridgeChannel); TypeId -BridgeChannel::GetTypeId (void) +BridgeChannel::GetTypeId () { static TypeId tid = TypeId ("ns3::BridgeChannel") .SetParent () @@ -68,7 +68,7 @@ BridgeChannel::AddChannel (Ptr bridgedChannel) } std::size_t -BridgeChannel::GetNDevices (void) const +BridgeChannel::GetNDevices () const { uint32_t ndevices = 0; for (std::vector< Ptr >::const_iterator iter = m_bridgedChannels.begin (); diff --git a/src/bridge/model/bridge-channel.h b/src/bridge/model/bridge-channel.h index 7ab2e9f14..efb3cf9c3 100644 --- a/src/bridge/model/bridge-channel.h +++ b/src/bridge/model/bridge-channel.h @@ -46,7 +46,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); BridgeChannel (); virtual ~BridgeChannel (); @@ -61,7 +61,7 @@ public: void AddChannel (Ptr bridgedChannel); // virtual methods implementation, from Channel - virtual std::size_t GetNDevices (void) const; + virtual std::size_t GetNDevices () const; virtual Ptr GetDevice (std::size_t i) const; private: diff --git a/src/bridge/model/bridge-net-device.cc b/src/bridge/model/bridge-net-device.cc index e99aa1e03..72bf714a9 100644 --- a/src/bridge/model/bridge-net-device.cc +++ b/src/bridge/model/bridge-net-device.cc @@ -38,7 +38,7 @@ NS_OBJECT_ENSURE_REGISTERED (BridgeNetDevice); TypeId -BridgeNetDevice::GetTypeId (void) +BridgeNetDevice::GetTypeId () { static TypeId tid = TypeId ("ns3::BridgeNetDevice") .SetParent () @@ -232,7 +232,7 @@ Ptr BridgeNetDevice::GetLearnedState (Mac48Address source) } uint32_t -BridgeNetDevice::GetNBridgePorts (void) const +BridgeNetDevice::GetNBridgePorts () const { NS_LOG_FUNCTION_NOARGS (); return m_ports.size (); @@ -279,14 +279,14 @@ BridgeNetDevice::SetIfIndex (const uint32_t index) } uint32_t -BridgeNetDevice::GetIfIndex (void) const +BridgeNetDevice::GetIfIndex () const { NS_LOG_FUNCTION_NOARGS (); return m_ifIndex; } Ptr -BridgeNetDevice::GetChannel (void) const +BridgeNetDevice::GetChannel () const { NS_LOG_FUNCTION_NOARGS (); return m_channel; @@ -300,7 +300,7 @@ BridgeNetDevice::SetAddress (Address address) } Address -BridgeNetDevice::GetAddress (void) const +BridgeNetDevice::GetAddress () const { NS_LOG_FUNCTION_NOARGS (); return m_address; @@ -315,7 +315,7 @@ BridgeNetDevice::SetMtu (const uint16_t mtu) } uint16_t -BridgeNetDevice::GetMtu (void) const +BridgeNetDevice::GetMtu () const { NS_LOG_FUNCTION_NOARGS (); return m_mtu; @@ -323,7 +323,7 @@ BridgeNetDevice::GetMtu (void) const bool -BridgeNetDevice::IsLinkUp (void) const +BridgeNetDevice::IsLinkUp () const { NS_LOG_FUNCTION_NOARGS (); return true; @@ -336,7 +336,7 @@ BridgeNetDevice::AddLinkChangeCallback (Callback callback) bool -BridgeNetDevice::IsBroadcast (void) const +BridgeNetDevice::IsBroadcast () const { NS_LOG_FUNCTION_NOARGS (); return true; @@ -344,14 +344,14 @@ BridgeNetDevice::IsBroadcast (void) const Address -BridgeNetDevice::GetBroadcast (void) const +BridgeNetDevice::GetBroadcast () const { NS_LOG_FUNCTION_NOARGS (); return Mac48Address ("ff:ff:ff:ff:ff:ff"); } bool -BridgeNetDevice::IsMulticast (void) const +BridgeNetDevice::IsMulticast () const { NS_LOG_FUNCTION_NOARGS (); return true; @@ -367,14 +367,14 @@ BridgeNetDevice::GetMulticast (Ipv4Address multicastGroup) const bool -BridgeNetDevice::IsPointToPoint (void) const +BridgeNetDevice::IsPointToPoint () const { NS_LOG_FUNCTION_NOARGS (); return false; } bool -BridgeNetDevice::IsBridge (void) const +BridgeNetDevice::IsBridge () const { NS_LOG_FUNCTION_NOARGS (); return true; @@ -421,7 +421,7 @@ BridgeNetDevice::SendFrom (Ptr packet, const Address& src, const Address Ptr -BridgeNetDevice::GetNode (void) const +BridgeNetDevice::GetNode () const { NS_LOG_FUNCTION_NOARGS (); return m_node; @@ -437,7 +437,7 @@ BridgeNetDevice::SetNode (Ptr node) bool -BridgeNetDevice::NeedsArp (void) const +BridgeNetDevice::NeedsArp () const { NS_LOG_FUNCTION_NOARGS (); return true; diff --git a/src/bridge/model/bridge-net-device.h b/src/bridge/model/bridge-net-device.h index 5022e9c1a..aa0d64fed 100644 --- a/src/bridge/model/bridge-net-device.h +++ b/src/bridge/model/bridge-net-device.h @@ -75,7 +75,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); BridgeNetDevice (); virtual ~BridgeNetDevice (); @@ -103,7 +103,7 @@ public: * * \return the number of bridged ports. */ - uint32_t GetNBridgePorts (void) const; + uint32_t GetNBridgePorts () const; /** * \brief Gets the n-th bridged port. @@ -114,32 +114,32 @@ public: // inherited from NetDevice base class. virtual void SetIfIndex (const uint32_t index); - virtual uint32_t GetIfIndex (void) const; - virtual Ptr GetChannel (void) const; + virtual uint32_t GetIfIndex () const; + virtual Ptr GetChannel () const; virtual void SetAddress (Address address); - virtual Address GetAddress (void) const; + virtual Address GetAddress () const; virtual bool SetMtu (const uint16_t mtu); - virtual uint16_t GetMtu (void) const; - virtual bool IsLinkUp (void) const; + virtual uint16_t GetMtu () const; + virtual bool IsLinkUp () const; virtual void AddLinkChangeCallback (Callback callback); - virtual bool IsBroadcast (void) const; - virtual Address GetBroadcast (void) const; - virtual bool IsMulticast (void) const; + virtual bool IsBroadcast () const; + virtual Address GetBroadcast () const; + virtual bool IsMulticast () const; virtual Address GetMulticast (Ipv4Address multicastGroup) const; - virtual bool IsPointToPoint (void) const; - virtual bool IsBridge (void) const; + virtual bool IsPointToPoint () const; + virtual bool IsBridge () const; virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); virtual bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber); - virtual Ptr GetNode (void) const; + virtual Ptr GetNode () const; virtual void SetNode (Ptr node); - virtual bool NeedsArp (void) const; + virtual bool NeedsArp () const; virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); virtual void SetPromiscReceiveCallback (NetDevice::PromiscReceiveCallback cb); virtual bool SupportsSendFrom () const; virtual Address GetMulticast (Ipv6Address addr) const; protected: - virtual void DoDispose (void); + virtual void DoDispose (); /** * \brief Receives a packet from one bridged port. diff --git a/src/buildings/helper/building-allocator.cc b/src/buildings/helper/building-allocator.cc index 570d01e66..fa5858b01 100644 --- a/src/buildings/helper/building-allocator.cc +++ b/src/buildings/helper/building-allocator.cc @@ -46,7 +46,7 @@ GridBuildingAllocator::~GridBuildingAllocator () } TypeId -GridBuildingAllocator::GetTypeId (void) +GridBuildingAllocator::GetTypeId () { static TypeId tid = TypeId ("ns3::GridBuildingAllocator") .SetParent () diff --git a/src/buildings/helper/building-allocator.h b/src/buildings/helper/building-allocator.h index 7f48b0aea..7480cc450 100644 --- a/src/buildings/helper/building-allocator.h +++ b/src/buildings/helper/building-allocator.h @@ -51,7 +51,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * Set an attribute to be used for each new building to be created diff --git a/src/buildings/helper/building-container.cc b/src/buildings/helper/building-container.cc index 81d79082c..03def0644 100644 --- a/src/buildings/helper/building-container.cc +++ b/src/buildings/helper/building-container.cc @@ -40,18 +40,18 @@ BuildingContainer::BuildingContainer (std::string buildingName) } BuildingContainer::Iterator -BuildingContainer::Begin (void) const +BuildingContainer::Begin () const { return m_buildings.begin (); } BuildingContainer::Iterator -BuildingContainer::End (void) const +BuildingContainer::End () const { return m_buildings.end (); } uint32_t -BuildingContainer::GetN (void) const +BuildingContainer::GetN () const { return m_buildings.size (); } @@ -89,7 +89,7 @@ BuildingContainer::Add (std::string buildingName) } BuildingContainer -BuildingContainer::GetGlobal (void) +BuildingContainer::GetGlobal () { BuildingContainer c; for (BuildingList::Iterator i = BuildingList::Begin (); i != BuildingList::End (); ++i) diff --git a/src/buildings/helper/building-container.h b/src/buildings/helper/building-container.h index 29c2a7283..7c1b2a728 100644 --- a/src/buildings/helper/building-container.h +++ b/src/buildings/helper/building-container.h @@ -84,7 +84,7 @@ public: * * \returns an iterator which refers to the first Building in the container. */ - Iterator Begin (void) const; + Iterator Begin () const; /** * \brief Get an iterator which indicates past-the-last Building in the @@ -105,7 +105,7 @@ public: * * \returns an iterator which indicates an ending condition for a loop. */ - Iterator End (void) const; + Iterator End () const; /** * \brief Get the number of Ptr stored in this container. @@ -127,7 +127,7 @@ public: * * \returns the number of Ptr stored in this container. */ - uint32_t GetN (void) const; + uint32_t GetN () const; /** * \brief Get the Ptr stored in this container at a given @@ -198,7 +198,7 @@ public: * * \returns a BuildingContainer which contains a list of all Buildings. */ - static BuildingContainer GetGlobal (void); + static BuildingContainer GetGlobal (); private: std::vector > m_buildings; //!< Building container diff --git a/src/buildings/helper/building-position-allocator.cc b/src/buildings/helper/building-position-allocator.cc index 07d38e26b..2805bda74 100644 --- a/src/buildings/helper/building-position-allocator.cc +++ b/src/buildings/helper/building-position-allocator.cc @@ -49,7 +49,7 @@ RandomBuildingPositionAllocator::RandomBuildingPositionAllocator () } TypeId -RandomBuildingPositionAllocator::GetTypeId (void) +RandomBuildingPositionAllocator::GetTypeId () { static TypeId tid = TypeId ("ns3::RandomBuildingPositionAllocator") .SetParent () @@ -114,7 +114,7 @@ OutdoorPositionAllocator::OutdoorPositionAllocator () } TypeId -OutdoorPositionAllocator::GetTypeId (void) +OutdoorPositionAllocator::GetTypeId () { static TypeId tid = TypeId ("ns3::OutdoorPositionAllocator") .SetParent () @@ -231,7 +231,7 @@ RandomRoomPositionAllocator::RandomRoomPositionAllocator () } TypeId -RandomRoomPositionAllocator::GetTypeId (void) +RandomRoomPositionAllocator::GetTypeId () { static TypeId tid = TypeId ("ns3::RandomRoomPositionAllocator") .SetParent () @@ -335,7 +335,7 @@ SameRoomPositionAllocator::SameRoomPositionAllocator (NodeContainer c) } TypeId -SameRoomPositionAllocator::GetTypeId (void) +SameRoomPositionAllocator::GetTypeId () { static TypeId tid = TypeId ("ns3::SameRoomPositionAllocator") .SetParent () @@ -417,7 +417,7 @@ FixedRoomPositionAllocator::FixedRoomPositionAllocator ( } TypeId -FixedRoomPositionAllocator::GetTypeId (void) +FixedRoomPositionAllocator::GetTypeId () { static TypeId tid = TypeId ("ns3::FixedRoomPositionAllocator") .SetParent () diff --git a/src/buildings/helper/building-position-allocator.h b/src/buildings/helper/building-position-allocator.h index af3514ddc..e41be71d5 100644 --- a/src/buildings/helper/building-position-allocator.h +++ b/src/buildings/helper/building-position-allocator.h @@ -45,10 +45,10 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext (void) const; + virtual Vector GetNext () const; /** * Assign a fixed random variable stream number to the random variables @@ -92,10 +92,10 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext (void) const; + virtual Vector GetNext () const; /** * \brief Set the random variable stream object that generates x-positions @@ -146,10 +146,10 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext (void) const; + virtual Vector GetNext () const; /** * Assign a fixed random variable stream number to the random variables @@ -201,10 +201,10 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext (void) const; + virtual Vector GetNext () const; /** * Assign a fixed random variable stream number to the random variables @@ -250,9 +250,9 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext (void) const; + virtual Vector GetNext () const; /** * Assign a fixed random variable stream number to the random variables diff --git a/src/buildings/model/building-list.cc b/src/buildings/model/building-list.cc index f433a605e..61ef17513 100644 --- a/src/buildings/model/building-list.cc +++ b/src/buildings/model/building-list.cc @@ -42,7 +42,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); BuildingListPriv (); ~BuildingListPriv (); @@ -58,13 +58,13 @@ public: * * \returns iterator to the begin of the container. */ - BuildingList::Iterator Begin (void) const; + BuildingList::Iterator Begin () const; /** * Returns an interator to the end of the list. * * \returns iterator to the end of the container. */ - BuildingList::Iterator End (void) const; + BuildingList::Iterator End () const; /** * Gets the n-th Building in the container * \param n Building position @@ -75,35 +75,35 @@ public: * Gets the number of Building in the container * \returns the container size */ - uint32_t GetNBuildings (void); + uint32_t GetNBuildings (); /** * Get the Singleton instance of BuildingListPriv (or create one) * \return the BuildingListPriv instance */ - static Ptr Get (void); + static Ptr Get (); private: - virtual void DoDispose (void); + virtual void DoDispose (); /** * Get the Singleton instance of BuildingListPriv (or create one) * \return the BuildingListPriv instance */ - static Ptr *DoGet (void); + static Ptr *DoGet (); /** * Dispose the Singleton instance of BuildingListPriv. * * \note: this function is automatically called at the simulation end. * */ - static void Delete (void); + static void Delete (); std::vector > m_buildings; //!< Container of Building }; NS_OBJECT_ENSURE_REGISTERED (BuildingListPriv); TypeId -BuildingListPriv::GetTypeId (void) +BuildingListPriv::GetTypeId () { static TypeId tid = TypeId ("ns3::BuildingListPriv") .SetParent () @@ -117,12 +117,12 @@ BuildingListPriv::GetTypeId (void) } Ptr -BuildingListPriv::Get (void) +BuildingListPriv::Get () { return *DoGet (); } Ptr * -BuildingListPriv::DoGet (void) +BuildingListPriv::DoGet () { static Ptr ptr = 0; if (!ptr) @@ -134,7 +134,7 @@ BuildingListPriv::DoGet (void) return &ptr; } void -BuildingListPriv::Delete (void) +BuildingListPriv::Delete () { NS_LOG_FUNCTION_NOARGS (); Config::UnregisterRootNamespaceObject (Get ()); @@ -150,7 +150,7 @@ BuildingListPriv::~BuildingListPriv () { } void -BuildingListPriv::DoDispose (void) +BuildingListPriv::DoDispose () { NS_LOG_FUNCTION_NOARGS (); for (std::vector >::iterator i = m_buildings.begin (); @@ -175,17 +175,17 @@ BuildingListPriv::Add (Ptr building) } BuildingList::Iterator -BuildingListPriv::Begin (void) const +BuildingListPriv::Begin () const { return m_buildings.begin (); } BuildingList::Iterator -BuildingListPriv::End (void) const +BuildingListPriv::End () const { return m_buildings.end (); } uint32_t -BuildingListPriv::GetNBuildings (void) +BuildingListPriv::GetNBuildings () { return m_buildings.size (); } @@ -213,12 +213,12 @@ BuildingList::Add (Ptr building) return BuildingListPriv::Get ()->Add (building); } BuildingList::Iterator -BuildingList::Begin (void) +BuildingList::Begin () { return BuildingListPriv::Get ()->Begin (); } BuildingList::Iterator -BuildingList::End (void) +BuildingList::End () { return BuildingListPriv::Get ()->End (); } @@ -228,7 +228,7 @@ BuildingList::GetBuilding (uint32_t n) return BuildingListPriv::Get ()->GetBuilding (n); } uint32_t -BuildingList::GetNBuildings (void) +BuildingList::GetNBuildings () { return BuildingListPriv::Get ()->GetNBuildings (); } diff --git a/src/buildings/model/building-list.h b/src/buildings/model/building-list.h index eec932055..e00c084f6 100644 --- a/src/buildings/model/building-list.h +++ b/src/buildings/model/building-list.h @@ -51,12 +51,12 @@ public: * \returns a C++ iterator located at the beginning of this * list. */ - static Iterator Begin (void); + static Iterator Begin (); /** * \returns a C++ iterator located at the end of this * list. */ - static Iterator End (void); + static Iterator End (); /** * \param n index of requested building. * \returns the Building associated to index n. @@ -65,7 +65,7 @@ public: /** * \returns the number of buildings currently in the list. */ - static uint32_t GetNBuildings (void); + static uint32_t GetNBuildings (); }; } // namespace ns3 diff --git a/src/buildings/model/building.cc b/src/buildings/model/building.cc index 835d88056..c913fd426 100644 --- a/src/buildings/model/building.cc +++ b/src/buildings/model/building.cc @@ -36,7 +36,7 @@ NS_LOG_COMPONENT_DEFINE ("Building"); NS_OBJECT_ENSURE_REGISTERED (Building); TypeId -Building::GetTypeId (void) +Building::GetTypeId () { static TypeId tid = TypeId ("ns3::Building") .SetParent () @@ -129,7 +129,7 @@ Building::DoDispose () } uint32_t -Building::GetId (void) const +Building::GetId () const { NS_LOG_FUNCTION (this); return m_buildingId; diff --git a/src/buildings/model/building.h b/src/buildings/model/building.h index 11af2488a..5ca0bf53b 100644 --- a/src/buildings/model/building.h +++ b/src/buildings/model/building.h @@ -42,7 +42,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); virtual void DoDispose (); /** @@ -94,7 +94,7 @@ public: * \return the unique id of this Building. This unique id happens to * be also the index of the Building into the BuildingList. */ - uint32_t GetId (void) const; + uint32_t GetId () const; /** * Set the boundaries of the building diff --git a/src/buildings/model/buildings-channel-condition-model.cc b/src/buildings/model/buildings-channel-condition-model.cc index c7299ce71..735e0e393 100644 --- a/src/buildings/model/buildings-channel-condition-model.cc +++ b/src/buildings/model/buildings-channel-condition-model.cc @@ -32,7 +32,7 @@ NS_LOG_COMPONENT_DEFINE ("BuildingsChannelConditionModel"); NS_OBJECT_ENSURE_REGISTERED (BuildingsChannelConditionModel); TypeId -BuildingsChannelConditionModel::GetTypeId (void) +BuildingsChannelConditionModel::GetTypeId () { static TypeId tid = TypeId ("ns3::BuildingsChannelConditionModel") .SetParent () diff --git a/src/buildings/model/buildings-channel-condition-model.h b/src/buildings/model/buildings-channel-condition-model.h index e811d9332..9dce58411 100644 --- a/src/buildings/model/buildings-channel-condition-model.h +++ b/src/buildings/model/buildings-channel-condition-model.h @@ -44,7 +44,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** diff --git a/src/buildings/model/buildings-propagation-loss-model.cc b/src/buildings/model/buildings-propagation-loss-model.cc index b0405ccc7..2b4e06ab9 100644 --- a/src/buildings/model/buildings-propagation-loss-model.cc +++ b/src/buildings/model/buildings-propagation-loss-model.cc @@ -60,7 +60,7 @@ BuildingsPropagationLossModel::ShadowingLoss::GetReceiver () const } TypeId -BuildingsPropagationLossModel::GetTypeId (void) +BuildingsPropagationLossModel::GetTypeId () { static TypeId tid = TypeId ("ns3::BuildingsPropagationLossModel") diff --git a/src/buildings/model/buildings-propagation-loss-model.h b/src/buildings/model/buildings-propagation-loss-model.h index 4bb9489d2..4e73bc9db 100644 --- a/src/buildings/model/buildings-propagation-loss-model.h +++ b/src/buildings/model/buildings-propagation-loss-model.h @@ -62,7 +62,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); BuildingsPropagationLossModel (); /** @@ -128,7 +128,7 @@ protected: /** * \returns the receiver mobility model */ - Ptr GetReceiver (void) const; + Ptr GetReceiver () const; protected: double m_shadowingValue; //!< Shadowing value Ptr m_receiver; //!< The receiver mobility model diff --git a/src/buildings/model/hybrid-buildings-propagation-loss-model.cc b/src/buildings/model/hybrid-buildings-propagation-loss-model.cc index e8e10cb91..c8e5cbb12 100644 --- a/src/buildings/model/hybrid-buildings-propagation-loss-model.cc +++ b/src/buildings/model/hybrid-buildings-propagation-loss-model.cc @@ -59,7 +59,7 @@ HybridBuildingsPropagationLossModel::~HybridBuildingsPropagationLossModel () } TypeId -HybridBuildingsPropagationLossModel::GetTypeId (void) +HybridBuildingsPropagationLossModel::GetTypeId () { static TypeId tid = TypeId ("ns3::HybridBuildingsPropagationLossModel") diff --git a/src/buildings/model/hybrid-buildings-propagation-loss-model.h b/src/buildings/model/hybrid-buildings-propagation-loss-model.h index 7c5891ef9..83311a7a0 100644 --- a/src/buildings/model/hybrid-buildings-propagation-loss-model.h +++ b/src/buildings/model/hybrid-buildings-propagation-loss-model.h @@ -61,7 +61,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); HybridBuildingsPropagationLossModel (); ~HybridBuildingsPropagationLossModel (); diff --git a/src/buildings/model/itu-r-1238-propagation-loss-model.cc b/src/buildings/model/itu-r-1238-propagation-loss-model.cc index a5301e1f9..59d705853 100644 --- a/src/buildings/model/itu-r-1238-propagation-loss-model.cc +++ b/src/buildings/model/itu-r-1238-propagation-loss-model.cc @@ -36,7 +36,7 @@ NS_OBJECT_ENSURE_REGISTERED (ItuR1238PropagationLossModel); TypeId -ItuR1238PropagationLossModel::GetTypeId (void) +ItuR1238PropagationLossModel::GetTypeId () { static TypeId tid = TypeId ("ns3::ItuR1238PropagationLossModel") diff --git a/src/buildings/model/itu-r-1238-propagation-loss-model.h b/src/buildings/model/itu-r-1238-propagation-loss-model.h index 3c18b8bbc..3c1589126 100644 --- a/src/buildings/model/itu-r-1238-propagation-loss-model.h +++ b/src/buildings/model/itu-r-1238-propagation-loss-model.h @@ -41,7 +41,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * diff --git a/src/buildings/model/mobility-building-info.cc b/src/buildings/model/mobility-building-info.cc index 9090a27a1..39e2c15a0 100644 --- a/src/buildings/model/mobility-building-info.cc +++ b/src/buildings/model/mobility-building-info.cc @@ -34,7 +34,7 @@ NS_LOG_COMPONENT_DEFINE ("MobilityBuildingInfo"); NS_OBJECT_ENSURE_REGISTERED (MobilityBuildingInfo); TypeId -MobilityBuildingInfo::GetTypeId (void) +MobilityBuildingInfo::GetTypeId () { static TypeId tid = TypeId ("ns3::MobilityBuildingInfo") .SetParent () @@ -75,7 +75,7 @@ MobilityBuildingInfo::MobilityBuildingInfo (Ptr building) } bool -MobilityBuildingInfo::IsIndoor (void) +MobilityBuildingInfo::IsIndoor () { NS_LOG_FUNCTION (this); Ptr mm = this->GetObject (); @@ -131,28 +131,28 @@ MobilityBuildingInfo::SetIndoor (uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) void -MobilityBuildingInfo::SetOutdoor (void) +MobilityBuildingInfo::SetOutdoor () { NS_LOG_FUNCTION (this); m_indoor = false; } uint8_t -MobilityBuildingInfo::GetFloorNumber (void) +MobilityBuildingInfo::GetFloorNumber () { NS_LOG_FUNCTION (this); return (m_nFloor); } uint8_t -MobilityBuildingInfo::GetRoomNumberX (void) +MobilityBuildingInfo::GetRoomNumberX () { NS_LOG_FUNCTION (this); return (m_roomX); } uint8_t -MobilityBuildingInfo::GetRoomNumberY (void) +MobilityBuildingInfo::GetRoomNumberY () { NS_LOG_FUNCTION (this); return (m_roomY); diff --git a/src/buildings/model/mobility-building-info.h b/src/buildings/model/mobility-building-info.h index 488368703..c0bb156c1 100644 --- a/src/buildings/model/mobility-building-info.h +++ b/src/buildings/model/mobility-building-info.h @@ -53,7 +53,7 @@ public: * * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); MobilityBuildingInfo (); /** @@ -68,7 +68,7 @@ public: * * \return true if the MobilityBuildingInfo instance is indoor, false otherwise */ - bool IsIndoor (void); + bool IsIndoor (); /** * \brief Mark this MobilityBuildingInfo instance as indoor @@ -100,21 +100,21 @@ public: * * \return The floor number */ - uint8_t GetFloorNumber (void); + uint8_t GetFloorNumber (); /** * \brief Get the room number along x-axis at which the MobilityBuildingInfo instance is located * * \return The room number */ - uint8_t GetRoomNumberX (void); + uint8_t GetRoomNumberX (); /** * \brief Get the room number along y-axis at which the MobilityBuildingInfo instance is located * * \return The room number */ - uint8_t GetRoomNumberY (void); + uint8_t GetRoomNumberY (); /** * \brief Get the building in which the MobilityBuildingInfo instance is located diff --git a/src/buildings/model/oh-buildings-propagation-loss-model.cc b/src/buildings/model/oh-buildings-propagation-loss-model.cc index e192c2a34..c6d23edd0 100644 --- a/src/buildings/model/oh-buildings-propagation-loss-model.cc +++ b/src/buildings/model/oh-buildings-propagation-loss-model.cc @@ -49,7 +49,7 @@ OhBuildingsPropagationLossModel::~OhBuildingsPropagationLossModel () } TypeId -OhBuildingsPropagationLossModel::GetTypeId (void) +OhBuildingsPropagationLossModel::GetTypeId () { static TypeId tid = TypeId ("ns3::OhBuildingsPropagationLossModel") diff --git a/src/buildings/model/oh-buildings-propagation-loss-model.h b/src/buildings/model/oh-buildings-propagation-loss-model.h index f650e8cd5..544120c77 100644 --- a/src/buildings/model/oh-buildings-propagation-loss-model.h +++ b/src/buildings/model/oh-buildings-propagation-loss-model.h @@ -44,7 +44,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); OhBuildingsPropagationLossModel (); ~OhBuildingsPropagationLossModel (); diff --git a/src/buildings/model/random-walk-2d-outdoor-mobility-model.cc b/src/buildings/model/random-walk-2d-outdoor-mobility-model.cc index e2dded041..013ad338f 100644 --- a/src/buildings/model/random-walk-2d-outdoor-mobility-model.cc +++ b/src/buildings/model/random-walk-2d-outdoor-mobility-model.cc @@ -38,7 +38,7 @@ NS_LOG_COMPONENT_DEFINE ("RandomWalk2dOutdoor"); NS_OBJECT_ENSURE_REGISTERED (RandomWalk2dOutdoorMobilityModel); TypeId -RandomWalk2dOutdoorMobilityModel::GetTypeId (void) +RandomWalk2dOutdoorMobilityModel::GetTypeId () { static TypeId tid = TypeId ("ns3::RandomWalk2dOutdoorMobilityModel") .SetParent () @@ -96,14 +96,14 @@ RandomWalk2dOutdoorMobilityModel::GetTypeId (void) } void -RandomWalk2dOutdoorMobilityModel::DoInitialize (void) +RandomWalk2dOutdoorMobilityModel::DoInitialize () { DoInitializePrivate (); MobilityModel::DoInitialize (); } void -RandomWalk2dOutdoorMobilityModel::DoInitializePrivate (void) +RandomWalk2dOutdoorMobilityModel::DoInitializePrivate () { m_helper.Update (); double speed = m_speed->GetValue (); @@ -402,13 +402,13 @@ RandomWalk2dOutdoorMobilityModel::AvoidBuilding (Time delayLeft, Vector intersec } void -RandomWalk2dOutdoorMobilityModel::DoDispose (void) +RandomWalk2dOutdoorMobilityModel::DoDispose () { // chain up MobilityModel::DoDispose (); } Vector -RandomWalk2dOutdoorMobilityModel::DoGetPosition (void) const +RandomWalk2dOutdoorMobilityModel::DoGetPosition () const { m_helper.UpdateWithBounds (m_bounds); return m_helper.GetCurrentPosition (); @@ -422,7 +422,7 @@ RandomWalk2dOutdoorMobilityModel::DoSetPosition (const Vector &position) m_event = Simulator::ScheduleNow (&RandomWalk2dOutdoorMobilityModel::DoInitializePrivate, this); } Vector -RandomWalk2dOutdoorMobilityModel::DoGetVelocity (void) const +RandomWalk2dOutdoorMobilityModel::DoGetVelocity () const { return m_helper.GetVelocity (); } diff --git a/src/buildings/model/random-walk-2d-outdoor-mobility-model.h b/src/buildings/model/random-walk-2d-outdoor-mobility-model.h index abf3e40f7..a9b4995b8 100644 --- a/src/buildings/model/random-walk-2d-outdoor-mobility-model.h +++ b/src/buildings/model/random-walk-2d-outdoor-mobility-model.h @@ -61,7 +61,7 @@ public: * Register this type with the TypeId system. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** An enum representing the different working modes of this module. */ enum Mode { @@ -90,7 +90,7 @@ private: /** * Perform initialization of the object before MobilityModel::DoInitialize () */ - void DoInitializePrivate (void); + void DoInitializePrivate (); /** * Check if there is a building between two positions (or if the nextPosition is inside a building). * The code is taken from MmWave3gppBuildingsPropagationLossModel from the NYU/UNIPD ns-3 mmWave module @@ -110,11 +110,11 @@ private: */ Vector CalculateIntersectionFromOutside (const Vector ¤t, const Vector &next, const Box boundaries) const; - virtual void DoDispose (void); - virtual void DoInitialize (void); - virtual Vector DoGetPosition (void) const; + virtual void DoDispose (); + virtual void DoInitialize (); + virtual Vector DoGetPosition () const; virtual void DoSetPosition (const Vector &position); - virtual Vector DoGetVelocity (void) const; + virtual Vector DoGetVelocity () const; virtual int64_t DoAssignStreams (int64_t); ConstantVelocityHelper m_helper; //!< helper for this object diff --git a/src/buildings/model/three-gpp-v2v-channel-condition-model.cc b/src/buildings/model/three-gpp-v2v-channel-condition-model.cc index fd6ff370d..eaa1e2b5a 100644 --- a/src/buildings/model/three-gpp-v2v-channel-condition-model.cc +++ b/src/buildings/model/three-gpp-v2v-channel-condition-model.cc @@ -30,7 +30,7 @@ NS_LOG_COMPONENT_DEFINE ("ThreeGppV2vChannelConditionModel"); NS_OBJECT_ENSURE_REGISTERED (ThreeGppV2vUrbanChannelConditionModel); TypeId -ThreeGppV2vUrbanChannelConditionModel::GetTypeId (void) +ThreeGppV2vUrbanChannelConditionModel::GetTypeId () { static TypeId tid = TypeId ("ns3::ThreeGppV2vUrbanChannelConditionModel") .SetParent () @@ -96,7 +96,7 @@ ThreeGppV2vUrbanChannelConditionModel::ComputePnlos (Ptr a, NS_OBJECT_ENSURE_REGISTERED (ThreeGppV2vHighwayChannelConditionModel); TypeId -ThreeGppV2vHighwayChannelConditionModel::GetTypeId (void) +ThreeGppV2vHighwayChannelConditionModel::GetTypeId () { static TypeId tid = TypeId ("ns3::ThreeGppV2vHighwayChannelConditionModel") .SetParent () diff --git a/src/buildings/model/three-gpp-v2v-channel-condition-model.h b/src/buildings/model/three-gpp-v2v-channel-condition-model.h index b8f2cf4b0..4b64cad77 100644 --- a/src/buildings/model/three-gpp-v2v-channel-condition-model.h +++ b/src/buildings/model/three-gpp-v2v-channel-condition-model.h @@ -54,7 +54,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * Constructor for the ThreeGppV2vUrbanChannelConditionModel class @@ -116,7 +116,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * Constructor for the ThreeGppV2vHighwayChannelConditionModel class diff --git a/src/buildings/test/building-position-allocator-test.cc b/src/buildings/test/building-position-allocator-test.cc index 53232ff66..c543ab3bf 100644 --- a/src/buildings/test/building-position-allocator-test.cc +++ b/src/buildings/test/building-position-allocator-test.cc @@ -89,7 +89,7 @@ public: RandomRoomPositionAllocatorTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; @@ -173,7 +173,7 @@ public: SameRoomPositionAllocatorTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; diff --git a/src/buildings/test/buildings-channel-condition-model-test.cc b/src/buildings/test/buildings-channel-condition-model-test.cc index f7e16424a..66cb3a46b 100644 --- a/src/buildings/test/buildings-channel-condition-model-test.cc +++ b/src/buildings/test/buildings-channel-condition-model-test.cc @@ -55,7 +55,7 @@ private: /** * Builds the simulation scenario and perform the tests */ - virtual void DoRun (void); + virtual void DoRun (); /** * Struct containing the parameters for each test @@ -80,7 +80,7 @@ BuildingsChannelConditionModelTestCase::~BuildingsChannelConditionModelTestCase } void -BuildingsChannelConditionModelTestCase::DoRun (void) +BuildingsChannelConditionModelTestCase::DoRun () { TestVector testVector; diff --git a/src/buildings/test/buildings-helper-test.cc b/src/buildings/test/buildings-helper-test.cc index 413a29b72..127a0fd3a 100644 --- a/src/buildings/test/buildings-helper-test.cc +++ b/src/buildings/test/buildings-helper-test.cc @@ -122,7 +122,7 @@ public: BuildingsHelperOneTestCase (PositionInBuilding pib, BuildingData bd); private: - virtual void DoRun (void); + virtual void DoRun (); PositionInBuilding m_pib; //!< Position in the building BuildingData m_bd; //!< Building data diff --git a/src/buildings/test/buildings-pathloss-test.cc b/src/buildings/test/buildings-pathloss-test.cc index 55a47e682..44f2eaba3 100644 --- a/src/buildings/test/buildings-pathloss-test.cc +++ b/src/buildings/test/buildings-pathloss-test.cc @@ -147,7 +147,7 @@ BuildingsPathlossTestCase::~BuildingsPathlossTestCase () } void -BuildingsPathlossTestCase::DoRun (void) +BuildingsPathlossTestCase::DoRun () { NS_LOG_FUNCTION (this); diff --git a/src/buildings/test/buildings-pathloss-test.h b/src/buildings/test/buildings-pathloss-test.h index ed26f48e3..3b73e1220 100644 --- a/src/buildings/test/buildings-pathloss-test.h +++ b/src/buildings/test/buildings-pathloss-test.h @@ -67,7 +67,7 @@ public: virtual ~BuildingsPathlossTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); /** * Create a mobility model based on its index * \param index MobilityModel index diff --git a/src/buildings/test/buildings-shadowing-test.cc b/src/buildings/test/buildings-shadowing-test.cc index c8eefbe26..e52530c34 100644 --- a/src/buildings/test/buildings-shadowing-test.cc +++ b/src/buildings/test/buildings-shadowing-test.cc @@ -86,7 +86,7 @@ BuildingsShadowingTestCase::~BuildingsShadowingTestCase () } void -BuildingsShadowingTestCase::DoRun (void) +BuildingsShadowingTestCase::DoRun () { NS_LOG_FUNCTION (this); diff --git a/src/buildings/test/buildings-shadowing-test.h b/src/buildings/test/buildings-shadowing-test.h index 926549c20..3bd5ba3c5 100644 --- a/src/buildings/test/buildings-shadowing-test.h +++ b/src/buildings/test/buildings-shadowing-test.h @@ -68,7 +68,7 @@ public: virtual ~BuildingsShadowingTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); /** * Create a mobility model based on its index * \param index MobilityModel index diff --git a/src/buildings/test/outdoor-random-walk-test.cc b/src/buildings/test/outdoor-random-walk-test.cc index 40ef2eaad..315559ea0 100644 --- a/src/buildings/test/outdoor-random-walk-test.cc +++ b/src/buildings/test/outdoor-random-walk-test.cc @@ -47,7 +47,7 @@ public: virtual ~OutdoorRandomWalkTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); /** * Check that the position is the expected one @@ -76,7 +76,7 @@ OutdoorRandomWalkTestCase::CheckPositionOutdoor (Ptr () .AddAttribute ("TestInt16", "help text", diff --git a/src/config-store/model/attribute-default-iterator.cc b/src/config-store/model/attribute-default-iterator.cc index 7117cb730..1de171006 100644 --- a/src/config-store/model/attribute-default-iterator.cc +++ b/src/config-store/model/attribute-default-iterator.cc @@ -32,7 +32,7 @@ AttributeDefaultIterator::~AttributeDefaultIterator () { } void -AttributeDefaultIterator::Iterate (void) +AttributeDefaultIterator::Iterate () { for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++) { @@ -109,7 +109,7 @@ AttributeDefaultIterator::StartVisitTypeId (std::string name) { } void -AttributeDefaultIterator::EndVisitTypeId (void) +AttributeDefaultIterator::EndVisitTypeId () { } diff --git a/src/config-store/model/attribute-default-iterator.h b/src/config-store/model/attribute-default-iterator.h index aea1f38ef..c8da21333 100644 --- a/src/config-store/model/attribute-default-iterator.h +++ b/src/config-store/model/attribute-default-iterator.h @@ -40,7 +40,7 @@ public: * and VisitAttribute on the attributes in one TypeId. At the end of each TypeId * EndVisitTypeId is called. */ - void Iterate (void); + void Iterate (); private: /** * \brief Begin the analysis of a TypeId @@ -50,7 +50,7 @@ private: /** * \brief End the analysis of a TypeId */ - virtual void EndVisitTypeId (void); + virtual void EndVisitTypeId (); /** * \brief Visit an Attribute * \param tid the TypeId the attribute belongs to diff --git a/src/config-store/model/attribute-iterator.cc b/src/config-store/model/attribute-iterator.cc index 17049419e..adc9b2e26 100644 --- a/src/config-store/model/attribute-iterator.cc +++ b/src/config-store/model/attribute-iterator.cc @@ -38,7 +38,7 @@ AttributeIterator::~AttributeIterator () } void -AttributeIterator::Iterate (void) +AttributeIterator::Iterate () { for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN (); ++i) { @@ -81,7 +81,7 @@ AttributeIterator::GetCurrentPath (std::string attr) const } std::string -AttributeIterator::GetCurrentPath (void) const +AttributeIterator::GetCurrentPath () const { std::ostringstream oss; for (uint32_t i = 0; i < m_currentPath.size (); ++i) @@ -96,7 +96,7 @@ AttributeIterator::DoStartVisitObject (Ptr object) { } void -AttributeIterator::DoEndVisitObject (void) +AttributeIterator::DoEndVisitObject () { } void @@ -104,7 +104,7 @@ AttributeIterator::DoStartVisitPointerAttribute (Ptr object, std::string { } void -AttributeIterator::DoEndVisitPointerAttribute (void) +AttributeIterator::DoEndVisitPointerAttribute () { } void @@ -112,7 +112,7 @@ AttributeIterator::DoStartVisitArrayAttribute (Ptr object, std::string n { } void -AttributeIterator::DoEndVisitArrayAttribute (void) +AttributeIterator::DoEndVisitArrayAttribute () { } void @@ -120,7 +120,7 @@ AttributeIterator::DoStartVisitArrayItem (const ObjectPtrContainerValue &vector, { } void -AttributeIterator::DoEndVisitArrayItem (void) +AttributeIterator::DoEndVisitArrayItem () { } @@ -139,7 +139,7 @@ AttributeIterator::StartVisitObject (Ptr object) DoStartVisitObject (object); } void -AttributeIterator::EndVisitObject (void) +AttributeIterator::EndVisitObject () { m_currentPath.pop_back (); DoEndVisitObject (); @@ -152,7 +152,7 @@ AttributeIterator::StartVisitPointerAttribute (Ptr object, std::string n DoStartVisitPointerAttribute (object, name, value); } void -AttributeIterator::EndVisitPointerAttribute (void) +AttributeIterator::EndVisitPointerAttribute () { m_currentPath.pop_back (); m_currentPath.pop_back (); @@ -165,7 +165,7 @@ AttributeIterator::StartVisitArrayAttribute (Ptr object, std::string nam DoStartVisitArrayAttribute (object, name, vector); } void -AttributeIterator::EndVisitArrayAttribute (void) +AttributeIterator::EndVisitArrayAttribute () { m_currentPath.pop_back (); DoEndVisitArrayAttribute (); @@ -181,7 +181,7 @@ AttributeIterator::StartVisitArrayItem (const ObjectPtrContainerValue &vector, u DoStartVisitArrayItem (vector, index, item); } void -AttributeIterator::EndVisitArrayItem (void) +AttributeIterator::EndVisitArrayItem () { m_currentPath.pop_back (); m_currentPath.pop_back (); diff --git a/src/config-store/model/attribute-iterator.h b/src/config-store/model/attribute-iterator.h index 982f0d606..0207469ec 100644 --- a/src/config-store/model/attribute-iterator.h +++ b/src/config-store/model/attribute-iterator.h @@ -41,13 +41,13 @@ public: /** * Start the process of iterating all objects from the root namespace object */ - void Iterate (void); + void Iterate (); protected: /** * Get the current attribute path * \returns the current path string */ - std::string GetCurrentPath (void) const; + std::string GetCurrentPath () const; private: /** * This method visits and performs a config-store action (such as saving @@ -67,7 +67,7 @@ private: * This method is called to end the process of visiting the currently * visited object. */ - virtual void DoEndVisitObject (void); + virtual void DoEndVisitObject (); /** * Visit the attribute of type ns3::PointerValue, with the provided name, * found on the object pointed to by the first argument. @@ -80,7 +80,7 @@ private: /** * End the visit to the attribute of type ns3::PointerValue. */ - virtual void DoEndVisitPointerAttribute (void); + virtual void DoEndVisitPointerAttribute (); /** * Visit the attribute of type ns3::ObjectVectorValue, with the * provided name, found on the object pointed to by the first argument. @@ -95,7 +95,7 @@ private: /** * End the visit to the attribute of type ns3::ObjectVectorValue. */ - virtual void DoEndVisitArrayAttribute (void); + virtual void DoEndVisitArrayAttribute (); /** * Start to visit the object found in the input array at the provided index * \param vector the array @@ -106,7 +106,7 @@ private: /** * End the visit to the array item */ - virtual void DoEndVisitArrayItem (void); + virtual void DoEndVisitArrayItem (); /** * Perform the iteration @@ -140,7 +140,7 @@ private: /** * End the visit to the object */ - void EndVisitObject (void); + void EndVisitObject (); /** * Visit the attribute of type ns3::PointerValue, with the provided name, * found on the object pointed to by the first argument. @@ -153,7 +153,7 @@ private: /** * End the visit to the attribute of type ns3::PointerValue. */ - void EndVisitPointerAttribute (void); + void EndVisitPointerAttribute (); /** * Visit the attribute of type ns3::ObjectVectorValue, with the * provided name, found on the object pointed to by the first argument. @@ -168,7 +168,7 @@ private: /** * End the visit to the attribute of type ns3::ObjectVectorValue. */ - void EndVisitArrayAttribute (void); + void EndVisitArrayAttribute (); /** * Start to visit the object found in the input array at the provided index * \param vector the array @@ -179,7 +179,7 @@ private: /** * End the visit to the array item */ - void EndVisitArrayItem (void); + void EndVisitArrayItem (); std::vector > m_examined; ///< list of attributes examined diff --git a/src/config-store/model/config-store.cc b/src/config-store/model/config-store.cc index df394ab12..f14c38e8d 100644 --- a/src/config-store/model/config-store.cc +++ b/src/config-store/model/config-store.cc @@ -46,7 +46,7 @@ NS_LOG_COMPONENT_DEFINE ("ConfigStore"); NS_OBJECT_ENSURE_REGISTERED (ConfigStore); TypeId -ConfigStore::GetTypeId (void) +ConfigStore::GetTypeId () { static TypeId tid = TypeId ("ns3::ConfigStore") .SetParent () @@ -78,7 +78,7 @@ ConfigStore::GetTypeId (void) return tid; } TypeId -ConfigStore::GetInstanceTypeId (void) const +ConfigStore::GetInstanceTypeId () const { return GetTypeId (); } @@ -175,14 +175,14 @@ ConfigStore::SetSaveDeprecated (bool saveDeprecated) } void -ConfigStore::ConfigureAttributes (void) +ConfigStore::ConfigureAttributes () { NS_LOG_FUNCTION (this); m_file->Attributes (); } void -ConfigStore::ConfigureDefaults (void) +ConfigStore::ConfigureDefaults () { NS_LOG_FUNCTION (this); m_file->Default (); diff --git a/src/config-store/model/config-store.h b/src/config-store/model/config-store.h index 3ffdacb32..349eb1d11 100644 --- a/src/config-store/model/config-store.h +++ b/src/config-store/model/config-store.h @@ -82,8 +82,8 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); - virtual TypeId GetInstanceTypeId (void) const; + static TypeId GetTypeId (); + virtual TypeId GetInstanceTypeId () const; ConfigStore (); ~ConfigStore (); @@ -112,11 +112,11 @@ public: /** * Configure the default values */ - void ConfigureDefaults (void); + void ConfigureDefaults (); /** * Configure the attribute values */ - void ConfigureAttributes (void); + void ConfigureAttributes (); private: enum Mode m_mode; ///< store mode diff --git a/src/config-store/model/file-config.cc b/src/config-store/model/file-config.cc index 8b015feaf..76a0ddd23 100644 --- a/src/config-store/model/file-config.cc +++ b/src/config-store/model/file-config.cc @@ -42,13 +42,13 @@ void NoneFileConfig::SetFilename (std::string filename) {} void -NoneFileConfig::Default (void) +NoneFileConfig::Default () {} void -NoneFileConfig::Global (void) +NoneFileConfig::Global () {} void -NoneFileConfig::Attributes (void) +NoneFileConfig::Attributes () {} } // namespace ns3 diff --git a/src/config-store/model/file-config.h b/src/config-store/model/file-config.h index 72a908b58..cd07b3c60 100644 --- a/src/config-store/model/file-config.h +++ b/src/config-store/model/file-config.h @@ -47,15 +47,15 @@ public: /** * Load or save the default values */ - virtual void Default (void) = 0; + virtual void Default () = 0; /** * Load or save the global values */ - virtual void Global (void) = 0; + virtual void Global () = 0; /** * Load or save the attributes values */ - virtual void Attributes (void) = 0; + virtual void Attributes () = 0; protected: bool m_saveDeprecated; ///< save deprecated attributes @@ -71,9 +71,9 @@ public: NoneFileConfig (); virtual ~NoneFileConfig (); virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); + virtual void Default (); + virtual void Global (); + virtual void Attributes (); }; } // namespace ns3 diff --git a/src/config-store/model/raw-text-config.cc b/src/config-store/model/raw-text-config.cc index ccbdc0c0e..8d5c24194 100644 --- a/src/config-store/model/raw-text-config.cc +++ b/src/config-store/model/raw-text-config.cc @@ -58,7 +58,7 @@ RawTextConfigSave::SetFilename (std::string filename) m_os->open (filename.c_str (), std::ios::out); } void -RawTextConfigSave::Default (void) +RawTextConfigSave::Default () { NS_LOG_FUNCTION (this); class RawTextDefaultIterator : public AttributeDefaultIterator @@ -115,7 +115,7 @@ private: iterator.Iterate (); } void -RawTextConfigSave::Global (void) +RawTextConfigSave::Global () { NS_LOG_FUNCTION (this); for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i) @@ -127,7 +127,7 @@ RawTextConfigSave::Global (void) } } void -RawTextConfigSave::Attributes (void) +RawTextConfigSave::Attributes () { NS_LOG_FUNCTION (this); class RawTextAttributeIterator : public AttributeIterator @@ -216,7 +216,7 @@ RawTextConfigLoad::Strip (std::string value) } void -RawTextConfigLoad::Default (void) +RawTextConfigLoad::Default () { NS_LOG_FUNCTION (this); m_is->clear (); @@ -241,7 +241,7 @@ RawTextConfigLoad::Default (void) } } void -RawTextConfigLoad::Global (void) +RawTextConfigLoad::Global () { NS_LOG_FUNCTION (this); m_is->clear (); @@ -266,7 +266,7 @@ RawTextConfigLoad::Global (void) } } void -RawTextConfigLoad::Attributes (void) +RawTextConfigLoad::Attributes () { NS_LOG_FUNCTION (this); m_is->clear (); diff --git a/src/config-store/model/raw-text-config.h b/src/config-store/model/raw-text-config.h index ef9e2ab2d..007d5ef81 100644 --- a/src/config-store/model/raw-text-config.h +++ b/src/config-store/model/raw-text-config.h @@ -39,9 +39,9 @@ public: virtual ~RawTextConfigSave (); //!< destructor // Inherited virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); + virtual void Default (); + virtual void Global (); + virtual void Attributes (); private: /// Config store output stream std::ofstream *m_os; @@ -59,9 +59,9 @@ public: virtual ~RawTextConfigLoad (); //!< destructor // Inherited virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); + virtual void Default (); + virtual void Global (); + virtual void Attributes (); private: /** * Parse (potentially multi-) line configs into type, name, and values. diff --git a/src/config-store/model/xml-config.cc b/src/config-store/model/xml-config.cc index 859ec8ec2..16f84fdf9 100644 --- a/src/config-store/model/xml-config.cc +++ b/src/config-store/model/xml-config.cc @@ -98,7 +98,7 @@ XmlConfigSave::~XmlConfigSave () m_writer = 0; } void -XmlConfigSave::Default (void) +XmlConfigSave::Default () { class XmlDefaultIterator : public AttributeDefaultIterator { @@ -177,7 +177,7 @@ private: } void -XmlConfigSave::Attributes (void) +XmlConfigSave::Attributes () { class XmlTextAttributeIterator : public AttributeIterator { @@ -251,7 +251,7 @@ public: } void -XmlConfigSave::Global (void) +XmlConfigSave::Global () { int rc; for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i) @@ -300,7 +300,7 @@ XmlConfigLoad::SetFilename (std::string filename) m_filename = filename; } void -XmlConfigLoad::Default (void) +XmlConfigLoad::Default () { xmlTextReaderPtr reader = xmlNewTextReaderFilename (m_filename.c_str ()); if (reader == NULL) @@ -338,7 +338,7 @@ XmlConfigLoad::Default (void) xmlFreeTextReader (reader); } void -XmlConfigLoad::Global (void) +XmlConfigLoad::Global () { xmlTextReaderPtr reader = xmlNewTextReaderFilename (m_filename.c_str ()); if (reader == NULL) @@ -376,7 +376,7 @@ XmlConfigLoad::Global (void) xmlFreeTextReader (reader); } void -XmlConfigLoad::Attributes (void) +XmlConfigLoad::Attributes () { xmlTextReaderPtr reader = xmlNewTextReaderFilename (m_filename.c_str ()); if (reader == NULL) diff --git a/src/config-store/model/xml-config.h b/src/config-store/model/xml-config.h index 3bd5c376f..bc7dd4c58 100644 --- a/src/config-store/model/xml-config.h +++ b/src/config-store/model/xml-config.h @@ -40,9 +40,9 @@ public: virtual ~XmlConfigSave (); virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); + virtual void Default (); + virtual void Global (); + virtual void Attributes (); private: xmlTextWriterPtr m_writer; ///< XML writer }; @@ -58,9 +58,9 @@ public: virtual ~XmlConfigLoad (); virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); + virtual void Default (); + virtual void Global (); + virtual void Attributes (); private: std::string m_filename; ///< the file name }; diff --git a/src/core/examples/fatal-example.cc b/src/core/examples/fatal-example.cc index b08da2150..528284316 100644 --- a/src/core/examples/fatal-example.cc +++ b/src/core/examples/fatal-example.cc @@ -40,7 +40,7 @@ using namespace ns3; * \brief Triggers a fatal error without message, deferring termination. */ void -FatalNoMsg (void) +FatalNoMsg () { std::cerr << "\nEvent triggered fatal error without message, and continuing:" << std::endl; @@ -52,7 +52,7 @@ FatalNoMsg (void) * \brief Triggers a fatal error with an error message, deferring termination. */ void -FatalCont (void) +FatalCont () { std::cerr << "\nEvent triggered fatal error, with custom message, and continuing:" << std::endl; @@ -64,7 +64,7 @@ FatalCont (void) * \brief Triggers a fatal error with message, and terminating. */ void -Fatal (void) +Fatal () { std::cerr << "\nEvent triggered fatal error, with message, and terminating:" << std::endl; diff --git a/src/core/examples/hash-example.cc b/src/core/examples/hash-example.cc index 2293ca864..b2f2761c6 100644 --- a/src/core/examples/hash-example.cc +++ b/src/core/examples/hash-example.cc @@ -464,7 +464,7 @@ public: } /** \return The default dictionary path. */ - static std::string GetDefault (void) + static std::string GetDefault () { return "/usr/share/dict/words"; } diff --git a/src/core/examples/main-ptr.cc b/src/core/examples/main-ptr.cc index 28cb35c9c..a77c88150 100644 --- a/src/core/examples/main-ptr.cc +++ b/src/core/examples/main-ptr.cc @@ -42,7 +42,7 @@ public: /** Destructor. */ ~PtrExample (); /** Example class method. */ - void Method (void); + void Method (); }; PtrExample::PtrExample () { @@ -53,7 +53,7 @@ PtrExample::~PtrExample () std::cout << "PtrExample destructor" << std::endl; } void -PtrExample::Method (void) +PtrExample::Method () { std::cout << "PtrExample method" << std::endl; } @@ -84,7 +84,7 @@ StorePtr (Ptr p) * Set \c g_ptr to NULL. */ static void -ClearPtr (void) +ClearPtr () { g_ptr = 0; } diff --git a/src/core/examples/main-test-sync.cc b/src/core/examples/main-test-sync.cc index 0a95f5f65..af6bca92b 100644 --- a/src/core/examples/main-test-sync.cc +++ b/src/core/examples/main-test-sync.cc @@ -50,7 +50,7 @@ bool gFirstRun = false; /** An event method called many times from the background thread. */ void -inserted_function (void) +inserted_function () { NS_ASSERT (gFirstRun); NS_LOG_UNCOND ("inserted_function() called at " << @@ -59,7 +59,7 @@ inserted_function (void) /** An event method called many times from the main thread. */ void -background_function (void) +background_function () { NS_ASSERT (gFirstRun); NS_LOG_UNCOND ("background_function() called at " << @@ -68,7 +68,7 @@ background_function (void) /** An event method called once from the main thread. */ void -first_function (void) +first_function () { NS_LOG_UNCOND ("first_function() called at " << Simulator::Now ().GetSeconds () << " s"); @@ -82,7 +82,7 @@ public: /** Constructor. */ FakeNetDevice (); /** The thread entry point. */ - void Doit3 (void); + void Doit3 (); }; FakeNetDevice::FakeNetDevice () @@ -91,7 +91,7 @@ FakeNetDevice::FakeNetDevice () } void -FakeNetDevice::Doit3 (void) +FakeNetDevice::Doit3 () { NS_LOG_FUNCTION_NOARGS (); std::this_thread::sleep_for (std::chrono::seconds (1)); @@ -116,7 +116,7 @@ FakeNetDevice::Doit3 (void) * \c inserted_function. */ void -test (void) +test () { GlobalValue::Bind ("SimulatorImplementationType", StringValue ("ns3::RealtimeSimulatorImpl")); diff --git a/src/core/examples/sample-log-time-format.cc b/src/core/examples/sample-log-time-format.cc index 71fbcae78..1b7a94728 100644 --- a/src/core/examples/sample-log-time-format.cc +++ b/src/core/examples/sample-log-time-format.cc @@ -110,7 +110,7 @@ ReplacementTimePrinter (std::ostream &os) /** Set ReplacementTimePrinter as the time printer for log messages. */ void -ReplaceTimePrinter (void) +ReplaceTimePrinter () { std::cout << "Replacing time printer function after Simulator::Run ()" << std::endl; LogSetTimePrinter (&ReplacementTimePrinter); diff --git a/src/core/examples/sample-show-progress.cc b/src/core/examples/sample-show-progress.cc index 26d5c9793..7f068aa8c 100644 --- a/src/core/examples/sample-show-progress.cc +++ b/src/core/examples/sample-show-progress.cc @@ -81,7 +81,7 @@ public: {} /** The Hold event. */ - void Event (void) + void Event () { double delta = m_rng->GetValue (); Time delay = Seconds (delta); diff --git a/src/core/examples/sample-simulator.cc b/src/core/examples/sample-simulator.cc index 3740c1353..1cb21d435 100644 --- a/src/core/examples/sample-simulator.cc +++ b/src/core/examples/sample-simulator.cc @@ -41,7 +41,7 @@ class MyModel { public: /** Start model execution by scheduling a HandleEvent. */ - void Start (void); + void Start (); private: /** @@ -53,7 +53,7 @@ private: }; void -MyModel::Start (void) +MyModel::Start () { Simulator::Schedule (Seconds (10.0), &MyModel::HandleEvent, @@ -84,7 +84,7 @@ ExampleFunction (MyModel *model) * Simple function event handler; this function is called randomly. */ static void -RandomFunction (void) +RandomFunction () { std::cout << "RandomFunction received event at " << Simulator::Now ().GetSeconds () << "s" << std::endl; @@ -92,7 +92,7 @@ RandomFunction (void) /** Simple function event handler; the corresponding event is cancelled. */ static void -CancelledEvent (void) +CancelledEvent () { std::cout << "I should never be called... " << std::endl; } diff --git a/src/core/examples/test-string-value-formatting.cc b/src/core/examples/test-string-value-formatting.cc index de2016209..357f8003a 100644 --- a/src/core/examples/test-string-value-formatting.cc +++ b/src/core/examples/test-string-value-formatting.cc @@ -52,14 +52,14 @@ public: * \brief Register this type and get the TypeId. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Default constructor */ FormattingTestObject (); /** * Get the test variable * \returns the test variable */ - Ptr GetTestVariable (void) const; + Ptr GetTestVariable () const; private: Ptr m_testVariable; //!< The test variable @@ -68,7 +68,7 @@ private: NS_OBJECT_ENSURE_REGISTERED (FormattingTestObject); TypeId -FormattingTestObject::GetTypeId (void) +FormattingTestObject::GetTypeId () { static TypeId tid = TypeId ("ns3::FormattingTestObject") .SetParent () @@ -85,7 +85,7 @@ FormattingTestObject::FormattingTestObject () {} Ptr -FormattingTestObject::GetTestVariable (void) const +FormattingTestObject::GetTestVariable () const { return m_testVariable; } @@ -110,7 +110,7 @@ public: * Create an Object as configured by SetAttribute * \returns the newly created Object */ - Ptr CreateFromFactory (void); + Ptr CreateFromFactory (); private: ObjectFactory m_factory; //!< Object factory @@ -128,7 +128,7 @@ FormattingTestObjectHelper::SetAttribute (std::string name, const AttributeValue } Ptr -FormattingTestObjectHelper::CreateFromFactory (void) +FormattingTestObjectHelper::CreateFromFactory () { return m_factory.Create (); } diff --git a/src/core/model/ascii-file.cc b/src/core/model/ascii-file.cc index ed230f600..d057e8a6c 100644 --- a/src/core/model/ascii-file.cc +++ b/src/core/model/ascii-file.cc @@ -46,18 +46,18 @@ AsciiFile::~AsciiFile () } bool -AsciiFile::Fail (void) const +AsciiFile::Fail () const { return m_file.fail (); } bool -AsciiFile::Eof (void) const +AsciiFile::Eof () const { return m_file.eof (); } void -AsciiFile::Close (void) +AsciiFile::Close () { m_file.close (); } diff --git a/src/core/model/ascii-file.h b/src/core/model/ascii-file.h index 0492263da..dfea717a8 100644 --- a/src/core/model/ascii-file.h +++ b/src/core/model/ascii-file.h @@ -44,11 +44,11 @@ public: /** * \return true if the 'fail' bit is set in the underlying iostream, false otherwise. */ - bool Fail (void) const; + bool Fail () const; /** * \return true if the 'eof' bit is set in the underlying iostream, false otherwise. */ - bool Eof (void) const; + bool Eof () const; /** * Create a new ascii file or open an existing ascii file. @@ -61,7 +61,7 @@ public: /** * Close the underlying file. */ - void Close (void); + void Close (); /** * \brief Read next line from file diff --git a/src/core/model/attribute-accessor-helper.h b/src/core/model/attribute-accessor-helper.h index c555737d6..35569c1f9 100644 --- a/src/core/model/attribute-accessor-helper.h +++ b/src/core/model/attribute-accessor-helper.h @@ -287,11 +287,11 @@ DoMakeAccessorHelperOne (U T::*memberVariable) v->Set (object->*m_memberVariable); return true; } - virtual bool HasGetter (void) const + virtual bool HasGetter () const { return true; } - virtual bool HasSetter (void) const + virtual bool HasSetter () const { return true; } @@ -317,7 +317,7 @@ DoMakeAccessorHelperOne (U T::*memberVariable) template inline Ptr -DoMakeAccessorHelperOne (U (T::*getter)(void) const) +DoMakeAccessorHelperOne (U (T::*getter)() const) { /* AttributeAccessor implementation with a class get functor method. */ class MemberMethod : public AccessorHelper @@ -327,7 +327,7 @@ DoMakeAccessorHelperOne (U (T::*getter)(void) const) * Construct from a class get functor method. * \param [in] getter The class get functor method pointer. */ - MemberMethod (U (T::*getter)(void) const) + MemberMethod (U (T::*getter)() const) : AccessorHelper (), m_getter (getter) {} @@ -342,15 +342,15 @@ DoMakeAccessorHelperOne (U (T::*getter)(void) const) v->Set ((object->*m_getter)()); return true; } - virtual bool HasGetter (void) const + virtual bool HasGetter () const { return true; } - virtual bool HasSetter (void) const + virtual bool HasSetter () const { return false; } - U (T::*m_getter)(void) const; // The class get functor method pointer. + U (T::*m_getter)() const; // The class get functor method pointer. }; return Ptr (new MemberMethod (getter), false); } @@ -403,11 +403,11 @@ DoMakeAccessorHelperOne (void (T::*setter)(U)) { return false; } - virtual bool HasGetter (void) const + virtual bool HasGetter () const { return false; } - virtual bool HasSetter (void) const + virtual bool HasSetter () const { return true; } @@ -438,7 +438,7 @@ template inline Ptr DoMakeAccessorHelperTwo (void (T::*setter)(U), - V (T::*getter)(void) const) + V (T::*getter)() const) { /* * AttributeAccessor implementation with class get functor and set method, @@ -453,7 +453,7 @@ DoMakeAccessorHelperTwo (void (T::*setter)(U), * \param [in] getter The class get functor method pointer. */ MemberMethod (void (T::*setter)(U), - V (T::*getter)(void) const) + V (T::*getter)() const) : AccessorHelper (), m_setter (setter), m_getter (getter) @@ -476,16 +476,16 @@ DoMakeAccessorHelperTwo (void (T::*setter)(U), v->Set ((object->*m_getter)()); return true; } - virtual bool HasGetter (void) const + virtual bool HasGetter () const { return true; } - virtual bool HasSetter (void) const + virtual bool HasSetter () const { return true; } void (T::*m_setter)(U); // The class set method pointer, returning void. - V (T::*m_getter)(void) const; // The class get functor method pointer. + V (T::*m_getter)() const; // The class get functor method pointer. }; return Ptr (new MemberMethod (setter, getter), false); } @@ -498,7 +498,7 @@ DoMakeAccessorHelperTwo (void (T::*setter)(U), template inline Ptr -DoMakeAccessorHelperTwo (V (T::*getter)(void) const, +DoMakeAccessorHelperTwo (V (T::*getter)() const, void (T::*setter)(U)) { return DoMakeAccessorHelperTwo (setter, getter); @@ -526,7 +526,7 @@ template inline Ptr DoMakeAccessorHelperTwo (bool (T::*setter)(U), - V (T::*getter)(void) const) + V (T::*getter)() const) { /* * AttributeAccessor implementation with class get functor and @@ -541,7 +541,7 @@ DoMakeAccessorHelperTwo (bool (T::*setter)(U), * \param [in] getter The class get functor method pointer. */ MemberMethod (bool (T::*setter)(U), - V (T::*getter)(void) const) + V (T::*getter)() const) : AccessorHelper (), m_setter (setter), m_getter (getter) @@ -564,16 +564,16 @@ DoMakeAccessorHelperTwo (bool (T::*setter)(U), v->Set ((object->*m_getter)()); return true; } - virtual bool HasGetter (void) const + virtual bool HasGetter () const { return true; } - virtual bool HasSetter (void) const + virtual bool HasSetter () const { return true; } bool (T::*m_setter)(U); // The class set method pointer, returning bool. - V (T::*m_getter)(void) const; // The class get functor method pointer. + V (T::*m_getter)() const; // The class get functor method pointer. }; return Ptr (new MemberMethod (setter, getter), false); } @@ -586,7 +586,7 @@ DoMakeAccessorHelperTwo (bool (T::*setter)(U), template inline Ptr -DoMakeAccessorHelperTwo (V (T::*getter)(void) const, +DoMakeAccessorHelperTwo (V (T::*getter)() const, bool (T::*setter)(U)) { return DoMakeAccessorHelperTwo (setter, getter); diff --git a/src/core/model/attribute-construction-list.cc b/src/core/model/attribute-construction-list.cc index 361af8d83..6d546d013 100644 --- a/src/core/model/attribute-construction-list.cc +++ b/src/core/model/attribute-construction-list.cc @@ -74,13 +74,13 @@ AttributeConstructionList::Find (Ptr checker) const } AttributeConstructionList::CIterator -AttributeConstructionList::Begin (void) const +AttributeConstructionList::Begin () const { NS_LOG_FUNCTION (this); return m_list.begin (); } AttributeConstructionList::CIterator -AttributeConstructionList::End (void) const +AttributeConstructionList::End () const { NS_LOG_FUNCTION (this); return m_list.end (); diff --git a/src/core/model/attribute-construction-list.h b/src/core/model/attribute-construction-list.h index 5ae3d711e..a0a9add4a 100644 --- a/src/core/model/attribute-construction-list.h +++ b/src/core/model/attribute-construction-list.h @@ -75,9 +75,9 @@ public: Ptr Find (Ptr checker) const; /** \returns The first item in the list */ - CIterator Begin (void) const; + CIterator Begin () const; /** \returns The end of the list (iterator to one past the last). */ - CIterator End (void) const; + CIterator End () const; private: diff --git a/src/core/model/attribute-container.h b/src/core/model/attribute-container.h index 6da3e029c..02a1d8a2c 100644 --- a/src/core/model/attribute-container.h +++ b/src/core/model/attribute-container.h @@ -99,7 +99,7 @@ public: ~AttributeContainerValue (); // Inherited - Ptr Copy (void) const; + Ptr Copy () const; bool DeserializeFromString (std::string value, Ptr checker); std::string SerializeToString (Ptr checker) const; @@ -108,7 +108,7 @@ public: * Return a container of items. * \return Container of items. */ - result_type Get (void) const; + result_type Get () const; /** * Copy items from container c. * @@ -136,44 +136,44 @@ public: * NS3-style Number of items. * \return Number of items in container. */ - size_type GetN (void) const; + size_type GetN () const; /** * NS3-style beginning of container. * \return Iterator pointing to first time in container. */ - Iterator Begin (void); + Iterator Begin (); /** * NS3-style ending of container. * \return Iterator pointing one past last item of container. */ - Iterator End (void); + Iterator End (); // STL-interface /** * STL-style number of items in container * \return number of items in container. */ - size_type size (void) const; + size_type size () const; /** * STL-style beginning of container. * \return Iterator pointing to first item in container. */ - iterator begin (void); + iterator begin (); /** * STL-style end of container. * \return Iterator pointing to one past last item in container. */ - iterator end (void); + iterator end (); /** * STL-style const beginning of container. * \return Const iterator pointing to first item in container. */ - const_iterator begin (void) const; + const_iterator begin () const; /** * STL-style const end of container. * \return Const iterator pointing to one past last item in container. */ - const_iterator end (void) const; + const_iterator end () const; private: /** @@ -205,7 +205,7 @@ public: * Get the item checker * \return The item checker */ - virtual Ptr GetItemChecker (void) const = 0; + virtual Ptr GetItemChecker () const = 0; }; /** @@ -237,7 +237,7 @@ MakeAttributeContainerChecker (Ptr itemchecker); * \return AttributeContainerChecker. */ template class C=std::list> -Ptr MakeAttributeContainerChecker (void); +Ptr MakeAttributeContainerChecker (); /** * Make AttributeContainerAccessor using explicit types. @@ -288,21 +288,21 @@ template class C> class AttributeContainerChecker : public ns3::AttributeContainerChecker { public: - AttributeContainerChecker (void); + AttributeContainerChecker (); /** * Explicit constructor * \param itemchecker The AttributeChecker. */ explicit AttributeContainerChecker (Ptr itemchecker); void SetItemChecker (Ptr itemchecker); - Ptr GetItemChecker (void) const; + Ptr GetItemChecker () const; private: Ptr m_itemchecker; //!< The AttributeChecker }; template class C> -AttributeContainerChecker::AttributeContainerChecker (void) +AttributeContainerChecker::AttributeContainerChecker () : m_itemchecker (0) {} @@ -320,7 +320,7 @@ AttributeContainerChecker::SetItemChecker (Ptr ite template class C> Ptr -AttributeContainerChecker::GetItemChecker (void) const +AttributeContainerChecker::GetItemChecker () const { return m_itemchecker; } @@ -346,7 +346,7 @@ MakeAttributeContainerChecker (Ptr itemchecker) template class C> Ptr -MakeAttributeContainerChecker (void) +MakeAttributeContainerChecker () { std::string containerType; std::string underlyingType; @@ -398,7 +398,7 @@ AttributeContainerValue::~AttributeContainerValue () template class C> Ptr -AttributeContainerValue::Copy (void) const +AttributeContainerValue::Copy () const { auto c = Create > (); c->m_sep = m_sep; @@ -445,7 +445,7 @@ AttributeContainerValue::SerializeToString (Ptr ch template class C> typename AttributeContainerValue::result_type -AttributeContainerValue::Get (void) const +AttributeContainerValue::Get () const { result_type c; for (const value_type& a: *this) @@ -475,56 +475,56 @@ AttributeContainerValue::Set (const T &c) template class C> typename AttributeContainerValue::size_type -AttributeContainerValue::GetN (void) const +AttributeContainerValue::GetN () const { return size (); } template class C> typename AttributeContainerValue::Iterator -AttributeContainerValue::Begin (void) +AttributeContainerValue::Begin () { return begin (); } template class C> typename AttributeContainerValue::Iterator -AttributeContainerValue::End (void) +AttributeContainerValue::End () { return end (); } template class C> typename AttributeContainerValue::size_type -AttributeContainerValue::size (void) const +AttributeContainerValue::size () const { return m_container.size (); } template class C> typename AttributeContainerValue::iterator -AttributeContainerValue::begin (void) +AttributeContainerValue::begin () { return m_container.begin (); } template class C> typename AttributeContainerValue::iterator -AttributeContainerValue::end (void) +AttributeContainerValue::end () { return m_container.end (); } template class C> typename AttributeContainerValue::const_iterator -AttributeContainerValue::begin (void) const +AttributeContainerValue::begin () const { return m_container.cbegin (); } template class C> typename AttributeContainerValue::const_iterator -AttributeContainerValue::end (void) const +AttributeContainerValue::end () const { return m_container.cend (); } diff --git a/src/core/model/attribute-helper.h b/src/core/model/attribute-helper.h index 49865e308..931ef85f6 100644 --- a/src/core/model/attribute-helper.h +++ b/src/core/model/attribute-helper.h @@ -107,19 +107,19 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) { return dynamic_cast (&value) != 0; } - virtual std::string GetValueTypeName (void) const + virtual std::string GetValueTypeName () const { return m_type; } - virtual bool HasUnderlyingTypeInformation (void) const + virtual bool HasUnderlyingTypeInformation () const { return true; } - virtual std::string GetUnderlyingTypeInformation (void) const + virtual std::string GetUnderlyingTypeInformation () const { return m_underlying; } - virtual Ptr Create (void) const + virtual Ptr Create () const { return ns3::Create (); } diff --git a/src/core/model/attribute.cc b/src/core/model/attribute.cc index ceedfe73c..d22b5a5f5 100644 --- a/src/core/model/attribute.cc +++ b/src/core/model/attribute.cc @@ -84,7 +84,7 @@ EmptyAttributeValue::EmptyAttributeValue () NS_LOG_FUNCTION (this); } Ptr -EmptyAttributeValue::Copy (void) const +EmptyAttributeValue::Copy () const { NS_LOG_FUNCTION (this); return Create (); @@ -125,13 +125,13 @@ EmptyAttributeAccessor::Get (const ObjectBase * object, AttributeValue &attribut } bool -EmptyAttributeAccessor::HasGetter (void) const +EmptyAttributeAccessor::HasGetter () const { return false; } bool -EmptyAttributeAccessor::HasSetter (void) const +EmptyAttributeAccessor::HasSetter () const { return false; } @@ -150,25 +150,25 @@ EmptyAttributeChecker::Check (const AttributeValue &value) const } std::string -EmptyAttributeChecker::GetValueTypeName (void) const +EmptyAttributeChecker::GetValueTypeName () const { return "EmptyAttribute"; } bool -EmptyAttributeChecker::HasUnderlyingTypeInformation (void) const +EmptyAttributeChecker::HasUnderlyingTypeInformation () const { return false; } std::string -EmptyAttributeChecker::GetUnderlyingTypeInformation (void) const +EmptyAttributeChecker::GetUnderlyingTypeInformation () const { return ""; } Ptr -EmptyAttributeChecker::Create (void) const +EmptyAttributeChecker::Create () const { static EmptyAttributeValue t; return Ptr (&t, false); diff --git a/src/core/model/attribute.h b/src/core/model/attribute.h index 970fb9e5e..1792470df 100644 --- a/src/core/model/attribute.h +++ b/src/core/model/attribute.h @@ -74,7 +74,7 @@ public: /** * \returns a deep copy of this class, wrapped into an Attribute object. */ - virtual Ptr Copy (void) const = 0; + virtual Ptr Copy () const = 0; /** * \param [in] checker The checker associated to the attribute * \returns A string representation of this value. @@ -141,12 +141,12 @@ public: * \return true if this accessor supports the Get operation, false * otherwise. */ - virtual bool HasGetter (void) const = 0; + virtual bool HasGetter () const = 0; /** * \return true if this accessor supports the Set operation, false * otherwise. */ - virtual bool HasSetter (void) const = 0; + virtual bool HasSetter () const = 0; }; /** @@ -192,7 +192,7 @@ public: * A typical return value here is FooValue where Foo is the name of the * type being wrapped. */ - virtual std::string GetValueTypeName (void) const = 0; + virtual std::string GetValueTypeName () const = 0; /** * \returns true if this checker has information about the underlying * C++ type, false otherwise. @@ -200,12 +200,12 @@ public: * If this method returns false, the return value of the GetUnderlyingTypeInformation * method cannot be relied upon. */ - virtual bool HasUnderlyingTypeInformation (void) const = 0; + virtual bool HasUnderlyingTypeInformation () const = 0; /** * \returns a human-readable representation of information about * the underlying C++ type. */ - virtual std::string GetUnderlyingTypeInformation (void) const = 0; + virtual std::string GetUnderlyingTypeInformation () const = 0; /** * \returns a new instance of an AttributeValue (wrapper in an Attribute * instance) which matches the type of the underlying attribute. @@ -213,7 +213,7 @@ public: * This method is typically used to create a temporary variable prior * to calling Attribute::DeserializeFromString. */ - virtual Ptr Create (void) const = 0; + virtual Ptr Create () const = 0; /** * Copy the source to the destination @@ -239,7 +239,7 @@ private: /** * \returns a deep copy of this class, wrapped into an Attribute object. */ - virtual Ptr Copy (void) const; + virtual Ptr Copy () const; /** * \param [in] checker The checker associated to the attribute * \returns a string representation of this value. @@ -270,8 +270,8 @@ public: ~EmptyAttributeAccessor (); virtual bool Set (ObjectBase * object, const AttributeValue &value) const; virtual bool Get (const ObjectBase * object, AttributeValue &attribute) const; - virtual bool HasGetter (void) const; - virtual bool HasSetter (void) const; + virtual bool HasGetter () const; + virtual bool HasSetter () const; }; /** @@ -299,10 +299,10 @@ public: EmptyAttributeChecker (); ~EmptyAttributeChecker (); virtual bool Check (const AttributeValue &value) const; - virtual std::string GetValueTypeName (void) const; - virtual bool HasUnderlyingTypeInformation (void) const; - virtual std::string GetUnderlyingTypeInformation (void) const; - virtual Ptr Create (void) const; + virtual std::string GetValueTypeName () const; + virtual bool HasUnderlyingTypeInformation () const; + virtual std::string GetUnderlyingTypeInformation () const; + virtual Ptr Create () const; virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const; }; diff --git a/src/core/model/boolean.cc b/src/core/model/boolean.cc index 5205dac67..d6c5913c8 100644 --- a/src/core/model/boolean.cc +++ b/src/core/model/boolean.cc @@ -48,7 +48,7 @@ BooleanValue::Set (bool value) m_value = value; } bool -BooleanValue::Get (void) const +BooleanValue::Get () const { NS_LOG_FUNCTION (this); return m_value; @@ -72,7 +72,7 @@ std::ostream & operator << (std::ostream &os, const BooleanValue &value) } Ptr -BooleanValue::Copy (void) const +BooleanValue::Copy () const { NS_LOG_FUNCTION (this); diff --git a/src/core/model/boolean.h b/src/core/model/boolean.h index 2308d379b..e3bdc53f0 100644 --- a/src/core/model/boolean.h +++ b/src/core/model/boolean.h @@ -44,7 +44,7 @@ public: */ BooleanValue (bool value); void Set (bool value); - bool Get (void) const; + bool Get () const; template bool GetAccessor (T &v) const; @@ -54,7 +54,7 @@ public: */ operator bool () const; - virtual Ptr Copy (void) const; + virtual Ptr Copy () const; virtual std::string SerializeToString (Ptr checker) const; virtual bool DeserializeFromString (std::string value, Ptr checker); diff --git a/src/core/model/breakpoint.cc b/src/core/model/breakpoint.cc index b34d6b7ec..2b73a35dd 100644 --- a/src/core/model/breakpoint.cc +++ b/src/core/model/breakpoint.cc @@ -39,7 +39,7 @@ NS_LOG_COMPONENT_DEFINE ("Breakpoint"); #if defined (HAVE_SIGNAL_H) && defined (SIGTRAP) void -BreakpointFallback (void) +BreakpointFallback () { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/core/model/breakpoint.h b/src/core/model/breakpoint.h index db1d7ab8d..3b5b6e476 100644 --- a/src/core/model/breakpoint.h +++ b/src/core/model/breakpoint.h @@ -82,7 +82,7 @@ namespace ns3 { * * Normally you should not call this function directly. */ -void BreakpointFallback (void); +void BreakpointFallback (); } // namespace ns3 diff --git a/src/core/model/calendar-scheduler.cc b/src/core/model/calendar-scheduler.cc index 0fa26634a..403bcb56a 100644 --- a/src/core/model/calendar-scheduler.cc +++ b/src/core/model/calendar-scheduler.cc @@ -42,7 +42,7 @@ NS_LOG_COMPONENT_DEFINE ("CalendarScheduler"); NS_OBJECT_ENSURE_REGISTERED (CalendarScheduler); TypeId -CalendarScheduler::GetTypeId (void) +CalendarScheduler::GetTypeId () { static TypeId tid = TypeId ("ns3::CalendarScheduler") .SetParent () @@ -121,7 +121,7 @@ CalendarScheduler::Init (uint32_t nBuckets, m_bucketTop = (startPrio / width + 1) * width; } void -CalendarScheduler::PrintInfo (void) +CalendarScheduler::PrintInfo () { NS_LOG_FUNCTION (this); @@ -172,13 +172,13 @@ CalendarScheduler::Insert (const Event &ev) ResizeUp (); } bool -CalendarScheduler::IsEmpty (void) const +CalendarScheduler::IsEmpty () const { NS_LOG_FUNCTION (this); return m_qSize == 0; } Scheduler::Event -CalendarScheduler::PeekNext (void) const +CalendarScheduler::PeekNext () const { NS_LOG_FUNCTION (this); NS_ASSERT (!IsEmpty ()); @@ -213,7 +213,7 @@ CalendarScheduler::PeekNext (void) const } Scheduler::Event -CalendarScheduler::DoRemoveNext (void) +CalendarScheduler::DoRemoveNext () { NS_LOG_FUNCTION (this); @@ -260,7 +260,7 @@ CalendarScheduler::DoRemoveNext (void) } Scheduler::Event -CalendarScheduler::RemoveNext (void) +CalendarScheduler::RemoveNext () { NS_LOG_FUNCTION (this << m_lastBucket << m_bucketTop); NS_ASSERT (!IsEmpty ()); @@ -299,7 +299,7 @@ CalendarScheduler::Remove (const Event &ev) } void -CalendarScheduler::ResizeUp (void) +CalendarScheduler::ResizeUp () { NS_LOG_FUNCTION (this); @@ -310,7 +310,7 @@ CalendarScheduler::ResizeUp (void) } } void -CalendarScheduler::ResizeDown (void) +CalendarScheduler::ResizeDown () { NS_LOG_FUNCTION (this); @@ -321,7 +321,7 @@ CalendarScheduler::ResizeDown (void) } uint64_t -CalendarScheduler::CalculateNewWidth (void) +CalendarScheduler::CalculateNewWidth () { NS_LOG_FUNCTION (this); diff --git a/src/core/model/calendar-scheduler.h b/src/core/model/calendar-scheduler.h index a91788257..f26fb9007 100644 --- a/src/core/model/calendar-scheduler.h +++ b/src/core/model/calendar-scheduler.h @@ -96,7 +96,7 @@ public: * Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ CalendarScheduler (); @@ -105,16 +105,16 @@ public: // Inherited virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty (void) const; - virtual Scheduler::Event PeekNext (void) const; - virtual Scheduler::Event RemoveNext (void); + virtual bool IsEmpty () const; + virtual Scheduler::Event PeekNext () const; + virtual Scheduler::Event RemoveNext (); virtual void Remove (const Scheduler::Event &ev); private: /** Double the number of buckets if necessary. */ - void ResizeUp (void); + void ResizeUp (); /** Halve the number of buckets if necessary. */ - void ResizeDown (void); + void ResizeDown (); /** * Resize to a new number of buckets, with automatically computed width. * @@ -126,7 +126,7 @@ private: * * \returns The new width. */ - uint64_t CalculateNewWidth (void); + uint64_t CalculateNewWidth (); /** * Initialize the calendar queue. * @@ -145,7 +145,7 @@ private: */ inline uint32_t Hash (uint64_t key) const; /** Print the configuration and bucket size distribution. */ - void PrintInfo (void); + void PrintInfo (); /** * Resize the number of buckets and width. * @@ -158,7 +158,7 @@ private: * * \returns The earliest event. */ - Scheduler::Event DoRemoveNext (void); + Scheduler::Event DoRemoveNext (); /** * Insert a new event in to the correct bucket. * diff --git a/src/core/model/callback.cc b/src/core/model/callback.cc index 352b68811..00faa4d58 100644 --- a/src/core/model/callback.cc +++ b/src/core/model/callback.cc @@ -51,7 +51,7 @@ CallbackValue::Set (CallbackBase base) m_value = base; } Ptr -CallbackValue::Copy (void) const +CallbackValue::Copy () const { NS_LOG_FUNCTION (this); return Create (m_value); diff --git a/src/core/model/callback.h b/src/core/model/callback.h index e76fc5100..bd108eb3c 100644 --- a/src/core/model/callback.h +++ b/src/core/model/callback.h @@ -94,7 +94,7 @@ public: * Get the name of this object type. * \return The object type as a string. */ - virtual std::string GetTypeid (void) const = 0; + virtual std::string GetTypeid () const = 0; protected: /** @@ -109,7 +109,7 @@ protected: * \returns The result of applying typeid to the template type \pname{T}. */ template - static std::string GetCppTypeid (void) + static std::string GetCppTypeid () { std::string typeName; try @@ -253,14 +253,14 @@ public: * Get the stored function. * \return A const reference to the stored function. */ - const std::function& GetFunction (void) const + const std::function& GetFunction () const { return m_func; } /** * Get the vector of callback components. * \return A const reference to the vector of callback components. */ - const CallbackComponentVector& GetComponents (void) const + const CallbackComponentVector& GetComponents () const { return m_components; } /** @@ -310,12 +310,12 @@ public: return true; } - virtual std::string GetTypeid (void) const + virtual std::string GetTypeid () const { return DoGetTypeid (); } /** \copydoc GetTypeid(). */ - static std::string DoGetTypeid (void) + static std::string DoGetTypeid () { static std::vector vec = { GetCppTypeid (), GetCppTypeid ()... }; @@ -353,7 +353,7 @@ public: CallbackBase () : m_impl () {} /** \return The impl pointer */ - Ptr GetImpl (void) const + Ptr GetImpl () const { return m_impl; } @@ -529,12 +529,12 @@ public: * * \return \c true if I don't have an implementation */ - bool IsNull (void) const + bool IsNull () const { return (DoPeekImpl () == 0); } /** Discard the implementation, set it to null */ - void Nullify (void) + void Nullify () { m_impl = 0; } @@ -594,7 +594,7 @@ public: private: /** \return The pimpl pointer */ - CallbackImpl *DoPeekImpl (void) const { + CallbackImpl *DoPeekImpl () const { return static_cast *> (PeekPointer (m_impl)); } /** @@ -694,7 +694,7 @@ Callback MakeCallback (R (*fnPtr)(Args...)) { * and potentially returning a value. */ template -Callback MakeNullCallback (void) { +Callback MakeNullCallback () { return Callback (); } @@ -765,7 +765,7 @@ public: template bool GetAccessor (T &value) const; /** \return A copy of this CallBack */ - virtual Ptr Copy (void) const; + virtual Ptr Copy () const; /** * Serialize to string * \param [in] checker The checker to validate with diff --git a/src/core/model/command-line.cc b/src/core/model/command-line.cc index 8802e84db..f63e59e84 100644 --- a/src/core/model/command-line.cc +++ b/src/core/model/command-line.cc @@ -148,7 +148,7 @@ CommandLine::Copy (const CommandLine &cmd) m_shortName = cmd.m_shortName; } void -CommandLine::Clear (void) +CommandLine::Clear () { NS_LOG_FUNCTION (this); @@ -405,7 +405,7 @@ CommandLine::PrintVersion (std::ostream & os) const } void -CommandLine::PrintDoxygenUsage (void) const +CommandLine::PrintDoxygenUsage () const { NS_LOG_FUNCTION (this); @@ -721,13 +721,13 @@ CommandLine::HandleArgument (const std::string &name, const std::string &value) } bool -CommandLine::CallbackItem::HasDefault (void) const +CommandLine::CallbackItem::HasDefault () const { return m_default != ""; } std::string -CommandLine::CallbackItem::GetDefault (void) const +CommandLine::CallbackItem::GetDefault () const { return m_default; } @@ -805,7 +805,7 @@ CommandLine::GetExtraNonOption (std::size_t i) const } std::size_t -CommandLine::GetNExtraNonOptions (void) const +CommandLine::GetNExtraNonOptions () const { if (m_nonOptions.size () > m_NNonOptions) { @@ -847,13 +847,13 @@ CommandLine::StringItem::Parse (const std::string value) } bool -CommandLine::StringItem::HasDefault (void) const +CommandLine::StringItem::HasDefault () const { return false; } std::string -CommandLine::StringItem::GetDefault (void) const +CommandLine::StringItem::GetDefault () const { return ""; } diff --git a/src/core/model/command-line.h b/src/core/model/command-line.h index 97015719f..c2b6e5681 100644 --- a/src/core/model/command-line.h +++ b/src/core/model/command-line.h @@ -229,7 +229,7 @@ class CommandLine { public: /** Constructor */ - CommandLine (void); + CommandLine (); /** * Construct and register the source file name. * This would typically be called by @@ -346,7 +346,7 @@ public: * * \returns the number of non-option arguments found. */ - std::size_t GetNExtraNonOptions (void) const; + std::size_t GetNExtraNonOptions () const; /** * Parse the program arguments @@ -471,8 +471,8 @@ private: public: // Inherited bool Parse (const std::string value); - bool HasDefault (void) const; - std::string GetDefault (void) const; + bool HasDefault () const; + std::string GetDefault () const; std::string m_value; /**< The argument value. */ }; // class StringItem @@ -485,8 +485,8 @@ private: { public: // Inherited - bool HasDefault (void) const; - std::string GetDefault (void) const; + bool HasDefault () const; + std::string GetDefault () const; /** * Parse from a string. @@ -580,13 +580,13 @@ private: */ void Copy (const CommandLine &cmd); /** Remove all arguments, Usage(), name */ - void Clear (void); + void Clear (); /** * Append usage message in Doxygen format to the file indicated * by the NS_COMMANDLINE_INTROSPECTION environment variable. * This is typically only called once, by Parse(). */ - void PrintDoxygenUsage (void) const; + void PrintDoxygenUsage () const; typedef std::vector Items; /**< Argument list container */ Items m_options; /**< The list of option arguments */ diff --git a/src/core/model/config.cc b/src/core/model/config.cc index 6f7bf6ceb..2bf62620e 100644 --- a/src/core/model/config.cc +++ b/src/core/model/config.cc @@ -54,19 +54,19 @@ MatchContainer::MatchContainer (const std::vector > &objects, NS_LOG_FUNCTION (this << &objects << &contexts << path); } MatchContainer::Iterator -MatchContainer::Begin (void) const +MatchContainer::Begin () const { NS_LOG_FUNCTION (this); return m_objects.begin (); } MatchContainer::Iterator -MatchContainer::End (void) const +MatchContainer::End () const { NS_LOG_FUNCTION (this); return m_objects.end (); } std::size_t -MatchContainer::GetN (void) const +MatchContainer::GetN () const { NS_LOG_FUNCTION (this); return m_objects.size (); @@ -84,7 +84,7 @@ MatchContainer::GetMatchedPath (uint32_t i) const return m_contexts[i]; } std::string -MatchContainer::GetPath (void) const +MatchContainer::GetPath () const { NS_LOG_FUNCTION (this); return m_path; @@ -321,7 +321,7 @@ public: private: /** Ensure the Config path starts and ends with a '/'. */ - void Canonicalize (void); + void Canonicalize (); /** * Parse the next element in the Config path. * @@ -348,7 +348,7 @@ private: * * \returns The current Config path. */ - std::string GetResolvedPath (void) const; + std::string GetResolvedPath () const; /** * Handle one found object. * @@ -375,7 +375,7 @@ Resolver::~Resolver () NS_LOG_FUNCTION (this); } void -Resolver::Canonicalize (void) +Resolver::Canonicalize () { NS_LOG_FUNCTION (this); @@ -403,7 +403,7 @@ Resolver::Resolve (Ptr root) } std::string -Resolver::GetResolvedPath (void) const +Resolver::GetResolvedPath () const { NS_LOG_FUNCTION (this); @@ -640,7 +640,7 @@ public: void UnregisterRootNamespaceObject (Ptr obj); /** \copydoc ns3::Config::GetRootNamespaceObjectN() */ - std::size_t GetRootNamespaceObjectN (void) const; + std::size_t GetRootNamespaceObjectN () const; /** \copydoc ns3::Config::GetRootNamespaceObject() */ Ptr GetRootNamespaceObject (std::size_t i) const; @@ -804,7 +804,7 @@ ConfigImpl::UnregisterRootNamespaceObject (Ptr obj) } std::size_t -ConfigImpl::GetRootNamespaceObjectN (void) const +ConfigImpl::GetRootNamespaceObjectN () const { NS_LOG_FUNCTION (this); return m_roots.size (); @@ -817,7 +817,7 @@ ConfigImpl::GetRootNamespaceObject (std::size_t i) const } -void Reset (void) +void Reset () { NS_LOG_FUNCTION_NOARGS (); // First, let's reset the initial value of every attribute @@ -955,7 +955,7 @@ void UnregisterRootNamespaceObject (Ptr obj) ConfigImpl::Get ()->UnregisterRootNamespaceObject (obj); } -std::size_t GetRootNamespaceObjectN (void) +std::size_t GetRootNamespaceObjectN () { NS_LOG_FUNCTION_NOARGS (); return ConfigImpl::Get ()->GetRootNamespaceObjectN (); diff --git a/src/core/model/config.h b/src/core/model/config.h index 5e9078b99..2d9eeffe0 100644 --- a/src/core/model/config.h +++ b/src/core/model/config.h @@ -53,7 +53,7 @@ namespace Config { * Reset the initial value of every attribute as well as the value of every * global to what they were before any call to SetDefault and SetGlobal. */ -void Reset (void); +void Reset (); /** * \ingroup config @@ -210,22 +210,22 @@ public: * \returns An iterator which points to the first item in the container * @{ */ - MatchContainer::Iterator Begin (void) const; - MatchContainer::Iterator begin (void) const { return Begin (); } + MatchContainer::Iterator Begin () const; + MatchContainer::Iterator begin () const { return Begin (); } /** @} */ /** * \returns An iterator which points to the last item in the container * @{ */ - MatchContainer::Iterator End (void) const; - MatchContainer::Iterator end (void) const { return End (); } + MatchContainer::Iterator End () const; + MatchContainer::Iterator end () const { return End (); } /** @} */ /** * \returns The number of items in the container * @{ */ - std::size_t GetN (void) const; - std::size_t size (void) const { return GetN (); } + std::size_t GetN () const; + std::size_t size () const { return GetN (); } /** @} */ /** * \param [in] i Index of item to lookup ([0,n[) @@ -243,7 +243,7 @@ public: /** * \returns The path used to perform the object matching. */ - std::string GetPath (void) const; + std::string GetPath () const; /** * \param [in] name Name of attribute to set @@ -364,7 +364,7 @@ void UnregisterRootNamespaceObject (Ptr obj); * \ingroup config * \returns The number of registered root namespace objects. */ -std::size_t GetRootNamespaceObjectN (void); +std::size_t GetRootNamespaceObjectN (); /** * \ingroup config diff --git a/src/core/model/default-simulator-impl.cc b/src/core/model/default-simulator-impl.cc index 1c2a0b545..283a5aa6f 100644 --- a/src/core/model/default-simulator-impl.cc +++ b/src/core/model/default-simulator-impl.cc @@ -44,7 +44,7 @@ NS_LOG_COMPONENT_DEFINE ("DefaultSimulatorImpl"); NS_OBJECT_ENSURE_REGISTERED (DefaultSimulatorImpl); TypeId -DefaultSimulatorImpl::GetTypeId (void) +DefaultSimulatorImpl::GetTypeId () { static TypeId tid = TypeId ("ns3::DefaultSimulatorImpl") .SetParent () @@ -74,7 +74,7 @@ DefaultSimulatorImpl::~DefaultSimulatorImpl () } void -DefaultSimulatorImpl::DoDispose (void) +DefaultSimulatorImpl::DoDispose () { NS_LOG_FUNCTION (this); ProcessEventsWithContext (); @@ -122,13 +122,13 @@ DefaultSimulatorImpl::SetScheduler (ObjectFactory schedulerFactory) // System ID for non-distributed simulation is always zero uint32_t -DefaultSimulatorImpl::GetSystemId (void) const +DefaultSimulatorImpl::GetSystemId () const { return 0; } void -DefaultSimulatorImpl::ProcessOneEvent (void) +DefaultSimulatorImpl::ProcessOneEvent () { Scheduler::Event next = m_events->RemoveNext (); @@ -150,13 +150,13 @@ DefaultSimulatorImpl::ProcessOneEvent (void) } bool -DefaultSimulatorImpl::IsFinished (void) const +DefaultSimulatorImpl::IsFinished () const { return m_events->IsEmpty () || m_stop; } void -DefaultSimulatorImpl::ProcessEventsWithContext (void) +DefaultSimulatorImpl::ProcessEventsWithContext () { if (m_eventsWithContextEmpty) { @@ -186,7 +186,7 @@ DefaultSimulatorImpl::ProcessEventsWithContext (void) } void -DefaultSimulatorImpl::Run (void) +DefaultSimulatorImpl::Run () { NS_LOG_FUNCTION (this); // Set the current threadId as the main threadId @@ -205,7 +205,7 @@ DefaultSimulatorImpl::Run (void) } void -DefaultSimulatorImpl::Stop (void) +DefaultSimulatorImpl::Stop () { NS_LOG_FUNCTION (this); m_stop = true; @@ -296,7 +296,7 @@ DefaultSimulatorImpl::ScheduleDestroy (EventImpl *event) } Time -DefaultSimulatorImpl::Now (void) const +DefaultSimulatorImpl::Now () const { // Do not add function logging here, to avoid stack overflow return TimeStep (m_currentTs); @@ -391,19 +391,19 @@ DefaultSimulatorImpl::IsExpired (const EventId &id) const } Time -DefaultSimulatorImpl::GetMaximumSimulationTime (void) const +DefaultSimulatorImpl::GetMaximumSimulationTime () const { return TimeStep (0x7fffffffffffffffLL); } uint32_t -DefaultSimulatorImpl::GetContext (void) const +DefaultSimulatorImpl::GetContext () const { return m_currentContext; } uint64_t -DefaultSimulatorImpl::GetEventCount (void) const +DefaultSimulatorImpl::GetEventCount () const { return m_eventCount; } diff --git a/src/core/model/default-simulator-impl.h b/src/core/model/default-simulator-impl.h index e1e122442..b1116163d 100644 --- a/src/core/model/default-simulator-impl.h +++ b/src/core/model/default-simulator-impl.h @@ -49,7 +49,7 @@ public: * Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ DefaultSimulatorImpl (); @@ -58,8 +58,8 @@ public: // Inherited virtual void Destroy (); - virtual bool IsFinished (void) const; - virtual void Stop (void); + virtual bool IsFinished () const; + virtual void Stop (); virtual void Stop (const Time &delay); virtual EventId Schedule (const Time &delay, EventImpl *event); virtual void ScheduleWithContext (uint32_t context, const Time &delay, EventImpl *event); @@ -68,22 +68,22 @@ public: virtual void Remove (const EventId &id); virtual void Cancel (const EventId &id); virtual bool IsExpired (const EventId &id) const; - virtual void Run (void); - virtual Time Now (void) const; + virtual void Run (); + virtual Time Now () const; virtual Time GetDelayLeft (const EventId &id) const; - virtual Time GetMaximumSimulationTime (void) const; + virtual Time GetMaximumSimulationTime () const; virtual void SetScheduler (ObjectFactory schedulerFactory); - virtual uint32_t GetSystemId (void) const; - virtual uint32_t GetContext (void) const; - virtual uint64_t GetEventCount (void) const; + virtual uint32_t GetSystemId () const; + virtual uint32_t GetContext () const; + virtual uint64_t GetEventCount () const; private: - virtual void DoDispose (void); + virtual void DoDispose (); /** Process the next event. */ - void ProcessOneEvent (void); + void ProcessOneEvent (); /** Move events from a different context into the main event queue. */ - void ProcessEventsWithContext (void); + void ProcessEventsWithContext (); /** Wrap an event with its execution context. */ struct EventWithContext diff --git a/src/core/model/des-metrics.cc b/src/core/model/des-metrics.cc index 343b50ab9..a83bdecbf 100644 --- a/src/core/model/des-metrics.cc +++ b/src/core/model/des-metrics.cc @@ -138,13 +138,13 @@ DesMetrics::TraceWithContext (uint32_t context, const Time & now, const Time & d m_separator = ','; } -DesMetrics::~DesMetrics (void) +DesMetrics::~DesMetrics () { Close (); } void -DesMetrics::Close (void) +DesMetrics::Close () { m_os << std::endl; // Finish the last event line diff --git a/src/core/model/des-metrics.h b/src/core/model/des-metrics.h index 7b2cb63df..24b6f0aba 100644 --- a/src/core/model/des-metrics.h +++ b/src/core/model/des-metrics.h @@ -140,12 +140,12 @@ public: /** * Destructor, closes the trace file. */ - ~DesMetrics (void); + ~DesMetrics (); private: /** Close the output file. */ - void Close (void); + void Close (); /** * Cache the last-used output directory. diff --git a/src/core/model/double.cc b/src/core/model/double.cc index e89d5e7d5..690e9af75 100644 --- a/src/core/model/double.cc +++ b/src/core/model/double.cc @@ -67,24 +67,24 @@ Ptr MakeDoubleChecker (double min, double max, std::stri } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } - virtual std::string GetValueTypeName (void) const + virtual std::string GetValueTypeName () const { NS_LOG_FUNCTION_NOARGS (); return "ns3::DoubleValue"; } - virtual bool HasUnderlyingTypeInformation (void) const + virtual bool HasUnderlyingTypeInformation () const { NS_LOG_FUNCTION_NOARGS (); return true; } - virtual std::string GetUnderlyingTypeInformation (void) const + virtual std::string GetUnderlyingTypeInformation () const { NS_LOG_FUNCTION_NOARGS (); std::ostringstream oss; oss << m_name << " " << m_minValue << ":" << m_maxValue; return oss.str (); } - virtual Ptr Create (void) const + virtual Ptr Create () const { NS_LOG_FUNCTION_NOARGS (); return ns3::Create (); diff --git a/src/core/model/double.h b/src/core/model/double.h index 7287945ce..43ae4802c 100644 --- a/src/core/model/double.h +++ b/src/core/model/double.h @@ -42,7 +42,7 @@ ATTRIBUTE_VALUE_DEFINE_WITH_NAME (double, Double); ATTRIBUTE_ACCESSOR_DEFINE (Double); template -Ptr MakeDoubleChecker (void); +Ptr MakeDoubleChecker (); /** * Make a checker with a minimum value. @@ -88,7 +88,7 @@ Ptr MakeDoubleChecker (double min, double max, std::stri } // namespace internal template -Ptr MakeDoubleChecker (void) +Ptr MakeDoubleChecker () { return internal::MakeDoubleChecker (-std::numeric_limits::max (), std::numeric_limits::max (), diff --git a/src/core/model/enum.cc b/src/core/model/enum.cc index 7d69ec39c..5341f9e3c 100644 --- a/src/core/model/enum.cc +++ b/src/core/model/enum.cc @@ -51,13 +51,13 @@ EnumValue::Set (int value) m_value = value; } int -EnumValue::Get (void) const +EnumValue::Get () const { NS_LOG_FUNCTION (this); return m_value; } Ptr -EnumValue::Copy (void) const +EnumValue::Copy () const { NS_LOG_FUNCTION (this); return ns3::Create (*this); @@ -141,19 +141,19 @@ EnumChecker::Check (const AttributeValue &value) const return (it != m_valueSet.end ()); } std::string -EnumChecker::GetValueTypeName (void) const +EnumChecker::GetValueTypeName () const { NS_LOG_FUNCTION (this); return "ns3::EnumValue"; } bool -EnumChecker::HasUnderlyingTypeInformation (void) const +EnumChecker::HasUnderlyingTypeInformation () const { NS_LOG_FUNCTION (this); return true; } std::string -EnumChecker::GetUnderlyingTypeInformation (void) const +EnumChecker::GetUnderlyingTypeInformation () const { NS_LOG_FUNCTION (this); std::ostringstream oss; @@ -166,7 +166,7 @@ EnumChecker::GetUnderlyingTypeInformation (void) const return oss.str (); } Ptr -EnumChecker::Create (void) const +EnumChecker::Create () const { NS_LOG_FUNCTION (this); return ns3::Create (); diff --git a/src/core/model/enum.h b/src/core/model/enum.h index 214f65194..e51a1ddb6 100644 --- a/src/core/model/enum.h +++ b/src/core/model/enum.h @@ -62,11 +62,11 @@ public: */ EnumValue (int value); void Set (int value); - int Get (void) const; + int Get () const; template bool GetAccessor (T & value) const; - virtual Ptr Copy (void) const; + virtual Ptr Copy () const; virtual std::string SerializeToString (Ptr checker) const; virtual bool DeserializeFromString (std::string value, Ptr checker); @@ -116,10 +116,10 @@ public: // Inherited virtual bool Check (const AttributeValue &value) const; - virtual std::string GetValueTypeName (void) const; - virtual bool HasUnderlyingTypeInformation (void) const; - virtual std::string GetUnderlyingTypeInformation (void) const; - virtual Ptr Create (void) const; + virtual std::string GetValueTypeName () const; + virtual bool HasUnderlyingTypeInformation () const; + virtual std::string GetUnderlyingTypeInformation () const; + virtual Ptr Create () const; virtual bool Copy (const AttributeValue &src, AttributeValue &dst) const; private: diff --git a/src/core/model/event-id.cc b/src/core/model/event-id.cc index 0ec846754..23d701546 100644 --- a/src/core/model/event-id.cc +++ b/src/core/model/event-id.cc @@ -50,49 +50,49 @@ EventId::EventId (const Ptr &impl, uint64_t ts, uint32_t context, uin NS_LOG_FUNCTION (this << impl << ts << context << uid); } void -EventId::Cancel (void) +EventId::Cancel () { NS_LOG_FUNCTION (this); Simulator::Cancel (*this); } void -EventId::Remove (void) +EventId::Remove () { NS_LOG_FUNCTION (this); Simulator::Remove (*this); } bool -EventId::IsExpired (void) const +EventId::IsExpired () const { NS_LOG_FUNCTION (this); return Simulator::IsExpired (*this); } bool -EventId::IsRunning (void) const +EventId::IsRunning () const { NS_LOG_FUNCTION (this); return !IsExpired (); } EventImpl * -EventId::PeekEventImpl (void) const +EventId::PeekEventImpl () const { NS_LOG_FUNCTION (this); return PeekPointer (m_eventImpl); } uint64_t -EventId::GetTs (void) const +EventId::GetTs () const { NS_LOG_FUNCTION (this); return m_ts; } uint32_t -EventId::GetContext (void) const +EventId::GetContext () const { NS_LOG_FUNCTION (this); return m_context; } uint32_t -EventId::GetUid (void) const +EventId::GetUid () const { NS_LOG_FUNCTION (this); return m_uid; diff --git a/src/core/model/event-id.h b/src/core/model/event-id.h index d4cf12357..e191ad80b 100644 --- a/src/core/model/event-id.h +++ b/src/core/model/event-id.h @@ -84,24 +84,24 @@ public: * This method is syntactic sugar for the ns3::Simulator::Cancel * method. */ - void Cancel (void); + void Cancel (); /** * This method is syntactic sugar for the ns3::Simulator::Remove * method. */ - void Remove (void); + void Remove (); /** * This method is syntactic sugar for the ns3::Simulator::IsExpired * method. * \returns \c true if the event has expired, \c false otherwise. */ - bool IsExpired (void) const; + bool IsExpired () const; /** * This method is syntactic sugar for !IsExpired(). * * \returns \c true if the event has not expired, \c false otherwise. */ - bool IsRunning (void) const; + bool IsRunning () const; public: /** @@ -111,13 +111,13 @@ public: */ /**@{*/ /** \return The underlying EventImpl pointer. */ - EventImpl * PeekEventImpl (void) const; + EventImpl * PeekEventImpl () const; /** \return The virtual time stamp. */ - uint64_t GetTs (void) const; + uint64_t GetTs () const; /** \return The event context. */ - uint32_t GetContext (void) const; + uint32_t GetContext () const; /** \return The unique id. */ - uint32_t GetUid (void) const; + uint32_t GetUid () const; /**@}*/ /** diff --git a/src/core/model/event-impl.cc b/src/core/model/event-impl.cc index fd33cd8a8..e49a5d686 100644 --- a/src/core/model/event-impl.cc +++ b/src/core/model/event-impl.cc @@ -43,7 +43,7 @@ EventImpl::EventImpl () } void -EventImpl::Invoke (void) +EventImpl::Invoke () { NS_LOG_FUNCTION (this); if (!m_cancel) @@ -53,14 +53,14 @@ EventImpl::Invoke (void) } void -EventImpl::Cancel (void) +EventImpl::Cancel () { NS_LOG_FUNCTION (this); m_cancel = true; } bool -EventImpl::IsCancelled (void) +EventImpl::IsCancelled () { NS_LOG_FUNCTION (this); return m_cancel; diff --git a/src/core/model/event-impl.h b/src/core/model/event-impl.h index 263da4c9f..f8157f476 100644 --- a/src/core/model/event-impl.h +++ b/src/core/model/event-impl.h @@ -52,19 +52,19 @@ public: * Called by the simulation engine to notify the event that it is time * to execute. */ - void Invoke (void); + void Invoke (); /** * Marks the event as 'canceled'. The event is not removed from * the event list but the simulation engine will check its canceled status * before calling Invoke(). */ - void Cancel (void); + void Cancel (); /** * \returns true if the event has been canceled. * * Checked by the simulation engine before calling Invoke(). */ - bool IsCancelled (void); + bool IsCancelled (); protected: /** @@ -73,7 +73,7 @@ protected: * This typically calls a method or function pointer with the * arguments bound by a call to one of the MakeEvent() functions. */ - virtual void Notify (void) = 0; + virtual void Notify () = 0; private: bool m_cancel; /**< Has this event been cancelled. */ diff --git a/src/core/model/example-as-test.cc b/src/core/model/example-as-test.cc index b2022be0d..ed992c5cc 100644 --- a/src/core/model/example-as-test.cc +++ b/src/core/model/example-as-test.cc @@ -54,13 +54,13 @@ ExampleAsTestCase::ExampleAsTestCase (const std::string name, NS_LOG_FUNCTION (this << name << program << dataDir << args); } -ExampleAsTestCase::~ExampleAsTestCase (void) +ExampleAsTestCase::~ExampleAsTestCase () { NS_LOG_FUNCTION_NOARGS (); } std::string -ExampleAsTestCase::GetCommandTemplate (void) const +ExampleAsTestCase::GetCommandTemplate () const { NS_LOG_FUNCTION_NOARGS (); std::string command ("%s "); @@ -69,7 +69,7 @@ ExampleAsTestCase::GetCommandTemplate (void) const } std::string -ExampleAsTestCase::GetPostProcessingCommand (void) const +ExampleAsTestCase::GetPostProcessingCommand () const { NS_LOG_FUNCTION_NOARGS (); std::string command (""); @@ -77,7 +77,7 @@ ExampleAsTestCase::GetPostProcessingCommand (void) const } void -ExampleAsTestCase::DoRun (void) +ExampleAsTestCase::DoRun () { NS_LOG_FUNCTION_NOARGS (); // Set up the output file names diff --git a/src/core/model/example-as-test.h b/src/core/model/example-as-test.h index ee0b0fbcb..d74341abc 100644 --- a/src/core/model/example-as-test.h +++ b/src/core/model/example-as-test.h @@ -72,7 +72,7 @@ public: const std::string args = ""); /** Destructor. */ - virtual ~ExampleAsTestCase (void); + virtual ~ExampleAsTestCase (); /** * Customization point for more complicated patterns @@ -80,7 +80,7 @@ public: * * \returns The string to be given to the `ns3 --command-template=` argument. */ - virtual std::string GetCommandTemplate (void) const; + virtual std::string GetCommandTemplate () const; /** * Customization point for tests requiring post-processing of stdout. @@ -91,10 +91,10 @@ public: * * \returns The string of post-processing commands */ - virtual std::string GetPostProcessingCommand (void) const; + virtual std::string GetPostProcessingCommand () const; // Inherited - virtual void DoRun (void); + virtual void DoRun (); protected: std::string m_program; /**< The program to run. */ diff --git a/src/core/model/fatal-impl.cc b/src/core/model/fatal-impl.cc index 299fc6ee2..f84c31746 100644 --- a/src/core/model/fatal-impl.cc +++ b/src/core/model/fatal-impl.cc @@ -70,7 +70,7 @@ namespace { * * \returns The address of the static pointer. */ -std::list ** PeekStreamList (void) +std::list ** PeekStreamList () { NS_LOG_FUNCTION_NOARGS (); static std::list *streams = 0; @@ -83,7 +83,7 @@ std::list ** PeekStreamList (void) * * \returns The stream list. */ -std::list * GetStreamList (void) +std::list * GetStreamList () { NS_LOG_FUNCTION_NOARGS (); std::list **pstreams = PeekStreamList (); @@ -146,7 +146,7 @@ void sigHandler (int sig) } // unnamed namespace void -FlushStreams (void) +FlushStreams () { NS_LOG_FUNCTION_NOARGS (); std::list **pl = PeekStreamList (); diff --git a/src/core/model/fatal-impl.h b/src/core/model/fatal-impl.h index f7a29fbe7..4ce3ea7f0 100644 --- a/src/core/model/fatal-impl.h +++ b/src/core/model/fatal-impl.h @@ -91,7 +91,7 @@ void UnregisterStream (std::ostream* stream); * * DO NOT call this function until the program is ready to crash. */ -void FlushStreams (void); +void FlushStreams (); } //FatalImpl } //ns3 diff --git a/src/core/model/global-value.cc b/src/core/model/global-value.cc index 4405cae5f..40c1e9b8f 100644 --- a/src/core/model/global-value.cc +++ b/src/core/model/global-value.cc @@ -65,7 +65,7 @@ GlobalValue::GlobalValue (std::string name, std::string help, } void -GlobalValue::InitializeFromEnv (void) +GlobalValue::InitializeFromEnv () { NS_LOG_FUNCTION (this); @@ -102,13 +102,13 @@ GlobalValue::InitializeFromEnv (void) } std::string -GlobalValue::GetName (void) const +GlobalValue::GetName () const { NS_LOG_FUNCTION_NOARGS (); return m_name; } std::string -GlobalValue::GetHelp (void) const +GlobalValue::GetHelp () const { NS_LOG_FUNCTION_NOARGS (); return m_help; @@ -130,7 +130,7 @@ GlobalValue::GetValue (AttributeValue &value) const str->Set (m_currentValue->SerializeToString (m_checker)); } Ptr -GlobalValue::GetChecker (void) const +GlobalValue::GetChecker () const { NS_LOG_FUNCTION (this); @@ -184,21 +184,21 @@ GlobalValue::BindFailSafe (std::string name, const AttributeValue &value) return false; } GlobalValue::Iterator -GlobalValue::Begin (void) +GlobalValue::Begin () { NS_LOG_FUNCTION_NOARGS (); return GetVector ()->begin (); } GlobalValue::Iterator -GlobalValue::End (void) +GlobalValue::End () { NS_LOG_FUNCTION_NOARGS (); return GetVector ()->end (); } void -GlobalValue::ResetInitialValue (void) +GlobalValue::ResetInitialValue () { NS_LOG_FUNCTION (this); m_currentValue = m_initialValue; @@ -230,7 +230,7 @@ GlobalValue::GetValueByName (std::string name, AttributeValue &value) } GlobalValue::Vector * -GlobalValue::GetVector (void) +GlobalValue::GetVector () { NS_LOG_FUNCTION_NOARGS (); static Vector vector; diff --git a/src/core/model/global-value.h b/src/core/model/global-value.h index 5d258e632..339fc5e88 100644 --- a/src/core/model/global-value.h +++ b/src/core/model/global-value.h @@ -98,12 +98,12 @@ public: * Get the name. * \returns The name of this GlobalValue. */ - std::string GetName (void) const; + std::string GetName () const; /** * Get the help string. * \returns The help text of this GlobalValue. */ - std::string GetHelp (void) const; + std::string GetHelp () const; /** * Get the value. * \param [out] value The AttributeValue to set to the value @@ -114,7 +114,7 @@ public: * Get the AttributeChecker. * \returns The checker associated to this GlobalValue. */ - Ptr GetChecker (void) const; + Ptr GetChecker () const; /** * Set the value of this GlobalValue. * \param [in] value the new value to set in this GlobalValue. @@ -123,7 +123,7 @@ public: bool SetValue (const AttributeValue &value); /** Reset to the initial value. */ - void ResetInitialValue (void); + void ResetInitialValue (); /** * Iterate over the set of GlobalValues until a matching name is found @@ -151,12 +151,12 @@ public: * The Begin iterator. * \returns An iterator which represents a pointer to the first GlobalValue registered. */ - static Iterator Begin (void); + static Iterator Begin (); /** * The End iterator. * \returns An iterator which represents a pointer to the last GlobalValue registered. */ - static Iterator End (void); + static Iterator End (); /** @@ -190,9 +190,9 @@ private: * * \returns The vector. */ - static Vector * GetVector (void); + static Vector * GetVector (); /** Initialize from the \c NS_GLOBAL_VALUE environment variable. */ - void InitializeFromEnv (void); + void InitializeFromEnv (); /** The name of this GlobalValue. */ std::string m_name; diff --git a/src/core/model/hash-fnv.cc b/src/core/model/hash-fnv.cc index 475005752..30a73769f 100644 --- a/src/core/model/hash-fnv.cc +++ b/src/core/model/hash-fnv.cc @@ -762,7 +762,7 @@ Fnv1a::GetHash64 (const char * buffer, const std::size_t size) } void -Fnv1a::clear (void) +Fnv1a::clear () { m_hash32 = FNV1_32A_INIT; m_hash64 = FNV1A_64_INIT; diff --git a/src/core/model/hash-fnv.h b/src/core/model/hash-fnv.h index f98eaa712..ecfc358d7 100644 --- a/src/core/model/hash-fnv.h +++ b/src/core/model/hash-fnv.h @@ -90,7 +90,7 @@ public: /** * Restore initial state */ - virtual void clear (void); + virtual void clear (); private: /** diff --git a/src/core/model/hash-function.h b/src/core/model/hash-function.h index 989a06868..70aef5624 100644 --- a/src/core/model/hash-function.h +++ b/src/core/model/hash-function.h @@ -82,7 +82,7 @@ public: /** * Restore initial state. */ - virtual void clear (void) = 0; + virtual void clear () = 0; /** * Constructor. */ diff --git a/src/core/model/hash-murmur3.cc b/src/core/model/hash-murmur3.cc index 0ee2764d6..e1cd387ff 100644 --- a/src/core/model/hash-murmur3.cc +++ b/src/core/model/hash-murmur3.cc @@ -570,7 +570,7 @@ Murmur3::GetHash64 (const char * buffer, const std::size_t size) } void -Murmur3::clear (void) +Murmur3::clear () { m_hash32 = (uint32_t)SEED; m_size32 = 0; diff --git a/src/core/model/hash-murmur3.h b/src/core/model/hash-murmur3.h index 9c34248ed..a5e0d18cc 100644 --- a/src/core/model/hash-murmur3.h +++ b/src/core/model/hash-murmur3.h @@ -90,7 +90,7 @@ public: /** * Restore initial state */ - virtual void clear (void); + virtual void clear (); private: /** diff --git a/src/core/model/hash.cc b/src/core/model/hash.cc index 285221f05..aa62cfdb7 100644 --- a/src/core/model/hash.cc +++ b/src/core/model/hash.cc @@ -32,7 +32,7 @@ namespace ns3 { NS_LOG_COMPONENT_DEFINE ("Hash"); -Hasher& GetStaticHash (void) +Hasher& GetStaticHash () { static Hasher g_hasher = Hasher (); g_hasher.clear(); @@ -52,7 +52,7 @@ Hasher::Hasher (Ptr hp) } Hasher & -Hasher::clear (void) +Hasher::clear () { m_impl->clear (); return *this; diff --git a/src/core/model/hash.h b/src/core/model/hash.h index bac56bca4..60c804e5d 100644 --- a/src/core/model/hash.h +++ b/src/core/model/hash.h @@ -170,7 +170,7 @@ public: * * \return This hasher. */ - Hasher & clear (void); + Hasher & clear (); private: Ptr m_impl; /**< Hash implementation. */ @@ -275,7 +275,7 @@ Hasher::GetHash64 (const std::string s) * \brief Get a reference to the static global hasher at g_hasher * \return Reference to the static Hasher instance. */ -Hasher& GetStaticHash (void); +Hasher& GetStaticHash (); inline uint32_t diff --git a/src/core/model/heap-scheduler.cc b/src/core/model/heap-scheduler.cc index 79ed574d3..bab7ca9f8 100644 --- a/src/core/model/heap-scheduler.cc +++ b/src/core/model/heap-scheduler.cc @@ -38,7 +38,7 @@ NS_LOG_COMPONENT_DEFINE ("HeapScheduler"); NS_OBJECT_ENSURE_REGISTERED (HeapScheduler); TypeId -HeapScheduler::GetTypeId (void) +HeapScheduler::GetTypeId () { static TypeId tid = TypeId ("ns3::HeapScheduler") .SetParent () @@ -89,7 +89,7 @@ HeapScheduler::RightChild (std::size_t id) const } std::size_t -HeapScheduler::Root (void) const +HeapScheduler::Root () const { NS_LOG_FUNCTION (this); return 1; @@ -103,7 +103,7 @@ HeapScheduler::IsRoot (std::size_t id) const } std::size_t -HeapScheduler::Last (void) const +HeapScheduler::Last () const { NS_LOG_FUNCTION (this); return m_heap.size () - 1; @@ -143,14 +143,14 @@ HeapScheduler::Smallest (std::size_t a, std::size_t b) const } bool -HeapScheduler::IsEmpty (void) const +HeapScheduler::IsEmpty () const { NS_LOG_FUNCTION (this); return (m_heap.size () == 1); } void -HeapScheduler::BottomUp (void) +HeapScheduler::BottomUp () { NS_LOG_FUNCTION (this); std::size_t index = Last (); @@ -207,13 +207,13 @@ HeapScheduler::Insert (const Event &ev) } Scheduler::Event -HeapScheduler::PeekNext (void) const +HeapScheduler::PeekNext () const { NS_LOG_FUNCTION (this); return m_heap[Root ()]; } Scheduler::Event -HeapScheduler::RemoveNext (void) +HeapScheduler::RemoveNext () { NS_LOG_FUNCTION (this); Event next = m_heap[Root ()]; diff --git a/src/core/model/heap-scheduler.h b/src/core/model/heap-scheduler.h index 2ce521ae8..1ebf9ef27 100644 --- a/src/core/model/heap-scheduler.h +++ b/src/core/model/heap-scheduler.h @@ -76,7 +76,7 @@ public: * Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ HeapScheduler (); @@ -85,9 +85,9 @@ public: // Inherited virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty (void) const; - virtual Scheduler::Event PeekNext (void) const; - virtual Scheduler::Event RemoveNext (void); + virtual bool IsEmpty () const; + virtual Scheduler::Event PeekNext () const; + virtual Scheduler::Event RemoveNext (); virtual void Remove (const Scheduler::Event &ev); private: @@ -127,12 +127,12 @@ private: * * \returns The root index. */ - inline std::size_t Root (void) const; + inline std::size_t Root () const; /** * Return the index of the last element. * \returns The last index. */ - std::size_t Last (void) const; + std::size_t Last () const; /** * Test if an index is the root. * @@ -171,7 +171,7 @@ private: */ inline void Exch (std::size_t a, std::size_t b); /** Percolate a newly inserted Last item to its proper position. */ - void BottomUp (void); + void BottomUp (); /** * Percolate a deletion bubble down the heap. * diff --git a/src/core/model/int64x64-128.h b/src/core/model/int64x64-128.h index 939e57190..ae55d3c58 100644 --- a/src/core/model/int64x64-128.h +++ b/src/core/model/int64x64-128.h @@ -228,7 +228,7 @@ public: * * \return This value in floating form. */ - inline double GetDouble (void) const + inline double GetDouble () const { const bool negative = _v < 0; const uint128_t value = negative ? -_v : _v; @@ -244,7 +244,7 @@ public: * * \return The integer portion of this value. */ - inline int64_t GetHigh (void) const + inline int64_t GetHigh () const { const int128_t retval = _v >> 64; return retval; @@ -254,7 +254,7 @@ public: * * \return The fractional portion, unscaled, as an integer. */ - inline uint64_t GetLow (void) const + inline uint64_t GetLow () const { const uint128_t retval = _v & HP_MASK_LO; return retval; @@ -265,7 +265,7 @@ public: * Truncation is always toward zero, * \return The value truncated toward zero. */ - int64_t GetInt (void) const + int64_t GetInt () const { const bool negative = _v < 0; const uint128_t value = negative ? -_v : _v; @@ -280,7 +280,7 @@ public: * regardless of the current (floating) rounding mode. * \return The value rounded to the nearest int. */ - int64_t Round (void) const + int64_t Round () const { const bool negative = _v < 0; int64x64_t value = (negative ? -(*this) : *this); diff --git a/src/core/model/integer.cc b/src/core/model/integer.cc index 7d890734d..cfb755701 100644 --- a/src/core/model/integer.cc +++ b/src/core/model/integer.cc @@ -66,24 +66,24 @@ MakeIntegerChecker (int64_t min, int64_t max, std::string name) } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } - virtual std::string GetValueTypeName (void) const + virtual std::string GetValueTypeName () const { NS_LOG_FUNCTION_NOARGS (); return "ns3::IntegerValue"; } - virtual bool HasUnderlyingTypeInformation (void) const + virtual bool HasUnderlyingTypeInformation () const { NS_LOG_FUNCTION_NOARGS (); return true; } - virtual std::string GetUnderlyingTypeInformation (void) const + virtual std::string GetUnderlyingTypeInformation () const { NS_LOG_FUNCTION_NOARGS (); std::ostringstream oss; oss << m_name << " " << m_minValue << ":" << m_maxValue; return oss.str (); } - virtual Ptr Create (void) const + virtual Ptr Create () const { NS_LOG_FUNCTION_NOARGS (); return ns3::Create (); diff --git a/src/core/model/integer.h b/src/core/model/integer.h index 3622885a0..346e76344 100644 --- a/src/core/model/integer.h +++ b/src/core/model/integer.h @@ -45,7 +45,7 @@ ATTRIBUTE_VALUE_DEFINE_WITH_NAME (int64_t, Integer); ATTRIBUTE_ACCESSOR_DEFINE (Integer); template -Ptr MakeIntegerChecker (void); +Ptr MakeIntegerChecker (); /** * Make a checker with a minimum value. @@ -108,7 +108,7 @@ MakeIntegerChecker (int64_t min) template Ptr -MakeIntegerChecker (void) +MakeIntegerChecker () { return internal::MakeIntegerChecker (std::numeric_limits::min (), std::numeric_limits::max (), diff --git a/src/core/model/list-scheduler.cc b/src/core/model/list-scheduler.cc index 1929b634a..1f409e469 100644 --- a/src/core/model/list-scheduler.cc +++ b/src/core/model/list-scheduler.cc @@ -38,7 +38,7 @@ NS_LOG_COMPONENT_DEFINE ("ListScheduler"); NS_OBJECT_ENSURE_REGISTERED (ListScheduler); TypeId -ListScheduler::GetTypeId (void) +ListScheduler::GetTypeId () { static TypeId tid = TypeId ("ns3::ListScheduler") .SetParent () @@ -70,20 +70,20 @@ ListScheduler::Insert (const Event &ev) m_events.push_back (ev); } bool -ListScheduler::IsEmpty (void) const +ListScheduler::IsEmpty () const { NS_LOG_FUNCTION (this); return m_events.empty (); } Scheduler::Event -ListScheduler::PeekNext (void) const +ListScheduler::PeekNext () const { NS_LOG_FUNCTION (this); return m_events.front (); } Scheduler::Event -ListScheduler::RemoveNext (void) +ListScheduler::RemoveNext () { NS_LOG_FUNCTION (this); Event next = m_events.front (); diff --git a/src/core/model/list-scheduler.h b/src/core/model/list-scheduler.h index 7c6abbca4..d624bb2fb 100644 --- a/src/core/model/list-scheduler.h +++ b/src/core/model/list-scheduler.h @@ -68,7 +68,7 @@ public: * Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ ListScheduler (); @@ -77,9 +77,9 @@ public: // Inherited virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty (void) const; - virtual Scheduler::Event PeekNext (void) const; - virtual Scheduler::Event RemoveNext (void); + virtual bool IsEmpty () const; + virtual Scheduler::Event PeekNext () const; + virtual Scheduler::Event RemoveNext (); virtual void Remove (const Scheduler::Event &ev); private: diff --git a/src/core/model/log.cc b/src/core/model/log.cc index 8bc19dc16..ed1d4129a 100644 --- a/src/core/model/log.cc +++ b/src/core/model/log.cc @@ -72,7 +72,7 @@ static PrintList g_printList; /* static */ LogComponent::ComponentList * -LogComponent::GetComponentList (void) +LogComponent::GetComponentList () { static LogComponent::ComponentList components; return &components; @@ -142,7 +142,7 @@ GetLogComponent (const std::string name) } void -LogComponent::EnvVarCheck (void) +LogComponent::EnvVarCheck () { const char *envVar = std::getenv ("NS_LOG"); if (envVar == 0 || std::strlen (envVar) == 0) @@ -286,7 +286,7 @@ LogComponent::IsEnabled (const enum LogLevel level) const } bool -LogComponent::IsNoneEnabled (void) const +LogComponent::IsNoneEnabled () const { return m_levels == 0; } @@ -310,13 +310,13 @@ LogComponent::Disable (const enum LogLevel level) } char const * -LogComponent::Name (void) const +LogComponent::Name () const { return m_name.c_str (); } std::string -LogComponent::File (void) const +LogComponent::File () const { return m_file; } @@ -422,7 +422,7 @@ LogComponentDisableAll (enum LogLevel level) } void -LogComponentPrintList (void) +LogComponentPrintList () { LogComponent::ComponentList *components = LogComponent::GetComponentList (); for (LogComponent::ComponentList::const_iterator i = components->begin (); @@ -525,7 +525,7 @@ static bool ComponentExists (std::string componentName) * Parse the \c NS_LOG environment variable. * This is private to the logging implementation. */ -static void CheckEnvironmentVariables (void) +static void CheckEnvironmentVariables () { const char *envVar = std::getenv ("NS_LOG"); if (envVar == 0 || std::strlen (envVar) == 0) @@ -626,7 +626,7 @@ void LogSetTimePrinter (TimePrinter printer) */ CheckEnvironmentVariables (); } -TimePrinter LogGetTimePrinter (void) +TimePrinter LogGetTimePrinter () { return g_logTimePrinter; } @@ -635,7 +635,7 @@ void LogSetNodePrinter (NodePrinter printer) { g_logNodePrinter = printer; } -NodePrinter LogGetNodePrinter (void) +NodePrinter LogGetNodePrinter () { return g_logNodePrinter; } diff --git a/src/core/model/log.h b/src/core/model/log.h index b815efebc..9d2b3ecc5 100644 --- a/src/core/model/log.h +++ b/src/core/model/log.h @@ -298,7 +298,7 @@ namespace ns3 { * Same as running your program with the NS_LOG environment * variable set as NS_LOG=print-list */ -void LogComponentPrintList (void); +void LogComponentPrintList (); /** * Set the TimePrinter function to be used @@ -313,7 +313,7 @@ void LogSetTimePrinter (TimePrinter lp); * Get the LogTimePrinter function currently in use. * \returns The current LogTimePrinter function. */ -TimePrinter LogGetTimePrinter (void); +TimePrinter LogGetTimePrinter (); /** * Set the LogNodePrinter function to be used @@ -328,7 +328,7 @@ void LogSetNodePrinter (NodePrinter np); * Get the LogNodePrinter function currently in use. * \returns The current LogNodePrinter function. */ -NodePrinter LogGetNodePrinter (void); +NodePrinter LogGetNodePrinter (); /** @@ -361,7 +361,7 @@ public: * * \return \c true if all levels are disabled. */ - bool IsNoneEnabled (void) const; + bool IsNoneEnabled () const; /** * Enable this LogComponent at \c level * @@ -379,12 +379,12 @@ public: * * \return The name of this LogComponent. */ - char const * Name (void) const; + char const * Name () const; /** * Get the compilation unit defining this LogComponent. * \returns The file name. */ - std::string File (void) const; + std::string File () const; /** * Get the string label for the given LogLevel. * @@ -419,14 +419,14 @@ public: * * \returns The list of LogComponents. */ - static ComponentList * GetComponentList (void); + static ComponentList * GetComponentList (); private: /** * Parse the `NS_LOG` environment variable for options relating to this * LogComponent. */ - void EnvVarCheck (void); + void EnvVarCheck (); int32_t m_levels; //!< Enabled LogLevels. int32_t m_mask; //!< Blocked LogLevels. diff --git a/src/core/model/make-event.cc b/src/core/model/make-event.cc index c82bd4e8b..a386b2ab3 100644 --- a/src/core/model/make-event.cc +++ b/src/core/model/make-event.cc @@ -31,14 +31,14 @@ namespace ns3 { NS_LOG_COMPONENT_DEFINE ("MakeEvent"); // This is the only non-templated version of MakeEvent. -EventImpl * MakeEvent (void (*f)(void)) +EventImpl * MakeEvent (void (*f)()) { NS_LOG_FUNCTION (f); // zero arg version class EventFunctionImpl0 : public EventImpl { public: - typedef void (*F)(void); + typedef void (*F)(); EventFunctionImpl0 (F function) : m_function (function) @@ -47,7 +47,7 @@ EventImpl * MakeEvent (void (*f)(void)) {} protected: - virtual void Notify (void) + virtual void Notify () { (*m_function)(); } diff --git a/src/core/model/make-event.h b/src/core/model/make-event.h index 1b66d8d59..5b53b63cb 100644 --- a/src/core/model/make-event.h +++ b/src/core/model/make-event.h @@ -188,7 +188,7 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, * \param [in] f The function pointer. * \returns The constructed EventImpl. */ -EventImpl * MakeEvent (void (*f)(void)); +EventImpl * MakeEvent (void (*f)()); /** * \copybrief MakeEvent(void(*f)(void)) @@ -381,7 +381,7 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj) {} private: - virtual void Notify (void) + virtual void Notify () { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(); } @@ -411,7 +411,7 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1) {} private: - virtual void Notify (void) + virtual void Notify () { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1); } @@ -442,7 +442,7 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) {} private: - virtual void Notify (void) + virtual void Notify () { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2); } @@ -475,7 +475,7 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) {} private: - virtual void Notify (void) + virtual void Notify () { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2, m_a3); } @@ -510,7 +510,7 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) {} private: - virtual void Notify (void) + virtual void Notify () { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2, m_a3, m_a4); } @@ -548,7 +548,7 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, {} private: - virtual void Notify (void) + virtual void Notify () { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2, m_a3, m_a4, m_a5); } @@ -588,7 +588,7 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, {} private: - virtual void Notify (void) + virtual void Notify () { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2, m_a3, m_a4, m_a5, m_a6); } @@ -624,7 +624,7 @@ EventImpl * MakeEvent (void (*f)(U1), T1 a1) {} private: - virtual void Notify (void) + virtual void Notify () { (*m_function)(m_a1); } @@ -655,7 +655,7 @@ EventImpl * MakeEvent (void (*f)(U1,U2), T1 a1, T2 a2) {} private: - virtual void Notify (void) + virtual void Notify () { (*m_function)(m_a1, m_a2); } @@ -689,7 +689,7 @@ EventImpl * MakeEvent (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) {} private: - virtual void Notify (void) + virtual void Notify () { (*m_function)(m_a1, m_a2, m_a3); } @@ -725,7 +725,7 @@ EventImpl * MakeEvent (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) {} private: - virtual void Notify (void) + virtual void Notify () { (*m_function)(m_a1, m_a2, m_a3, m_a4); } @@ -763,7 +763,7 @@ EventImpl * MakeEvent (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 {} private: - virtual void Notify (void) + virtual void Notify () { (*m_function)(m_a1, m_a2, m_a3, m_a4, m_a5); } @@ -803,7 +803,7 @@ EventImpl * MakeEvent (void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, {} private: - virtual void Notify (void) + virtual void Notify () { (*m_function)(m_a1, m_a2, m_a3, m_a4, m_a5, m_a6); } @@ -832,7 +832,7 @@ public: { } private: - virtual void Notify (void) + virtual void Notify () { m_function(); } diff --git a/src/core/model/map-scheduler.cc b/src/core/model/map-scheduler.cc index 159b561f4..5c1a62052 100644 --- a/src/core/model/map-scheduler.cc +++ b/src/core/model/map-scheduler.cc @@ -38,7 +38,7 @@ NS_LOG_COMPONENT_DEFINE ("MapScheduler"); NS_OBJECT_ENSURE_REGISTERED (MapScheduler); TypeId -MapScheduler::GetTypeId (void) +MapScheduler::GetTypeId () { static TypeId tid = TypeId ("ns3::MapScheduler") .SetParent () @@ -67,14 +67,14 @@ MapScheduler::Insert (const Event &ev) } bool -MapScheduler::IsEmpty (void) const +MapScheduler::IsEmpty () const { NS_LOG_FUNCTION (this); return m_list.empty (); } Scheduler::Event -MapScheduler::PeekNext (void) const +MapScheduler::PeekNext () const { NS_LOG_FUNCTION (this); EventMapCI i = m_list.begin (); @@ -87,7 +87,7 @@ MapScheduler::PeekNext (void) const return ev; } Scheduler::Event -MapScheduler::RemoveNext (void) +MapScheduler::RemoveNext () { NS_LOG_FUNCTION (this); EventMapI i = m_list.begin (); diff --git a/src/core/model/map-scheduler.h b/src/core/model/map-scheduler.h index 490f82c94..3dab9e070 100644 --- a/src/core/model/map-scheduler.h +++ b/src/core/model/map-scheduler.h @@ -66,7 +66,7 @@ public: * Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ MapScheduler (); @@ -75,9 +75,9 @@ public: // Inherited virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty (void) const; - virtual Scheduler::Event PeekNext (void) const; - virtual Scheduler::Event RemoveNext (void); + virtual bool IsEmpty () const; + virtual Scheduler::Event PeekNext () const; + virtual Scheduler::Event RemoveNext (); virtual void Remove (const Scheduler::Event &ev); private: diff --git a/src/core/model/names.cc b/src/core/model/names.cc index 8f4ccf05d..510c704fb 100644 --- a/src/core/model/names.cc +++ b/src/core/model/names.cc @@ -215,7 +215,7 @@ public: /** * Internal implementation for Names::Clear() */ - void Clear (void); + void Clear (); /** * Internal implementation for ns3::Names::Find(std::string) @@ -290,7 +290,7 @@ NamesPriv::~NamesPriv () } void -NamesPriv::Clear (void) +NamesPriv::Clear () { NS_LOG_FUNCTION (this); // @@ -828,7 +828,7 @@ Names::FindPath (Ptr object) } void -Names::Clear (void) +Names::Clear () { NS_LOG_FUNCTION_NOARGS (); return NamesPriv::Get ()->Clear (); diff --git a/src/core/model/names.h b/src/core/model/names.h index b1fe13cba..47f70d5e8 100644 --- a/src/core/model/names.h +++ b/src/core/model/names.h @@ -319,7 +319,7 @@ public: * \brief Clear the list of objects associated with names. */ - static void Clear (void); + static void Clear (); /** * \brief Given a name path string, look to see if there's an object diff --git a/src/core/model/nstime.h b/src/core/model/nstime.h index 8df683cfd..31b245f3a 100644 --- a/src/core/model/nstime.h +++ b/src/core/model/nstime.h @@ -298,7 +298,7 @@ public: * Exactly equivalent to `t == 0`. * \return \c true if the time is zero, \c false otherwise. */ - inline bool IsZero (void) const + inline bool IsZero () const { return m_data == 0; } @@ -306,7 +306,7 @@ public: * Exactly equivalent to `t <= 0`. * \return \c true if the time is negative or zero, \c false otherwise. */ - inline bool IsNegative (void) const + inline bool IsNegative () const { return m_data <= 0; } @@ -314,7 +314,7 @@ public: * Exactly equivalent to `t >= 0`. * \return \c true if the time is positive or zero, \c false otherwise. */ - inline bool IsPositive (void) const + inline bool IsPositive () const { return m_data >= 0; } @@ -322,7 +322,7 @@ public: * Exactly equivalent to `t < 0`. * \return \c true if the time is strictly negative, \c false otherwise. */ - inline bool IsStrictlyNegative (void) const + inline bool IsStrictlyNegative () const { return m_data < 0; } @@ -330,7 +330,7 @@ public: * Exactly equivalent to `t > 0`. * \return \c true if the time is strictly positive, \c false otherwise. */ - inline bool IsStrictlyPositive (void) const + inline bool IsStrictlyPositive () const { return m_data > 0; } @@ -361,43 +361,43 @@ public: * * \return An approximate value in the indicated unit. */ - inline double GetYears (void) const + inline double GetYears () const { return ToDouble (Time::Y); } - inline double GetDays (void) const + inline double GetDays () const { return ToDouble (Time::D); } - inline double GetHours (void) const + inline double GetHours () const { return ToDouble (Time::H); } - inline double GetMinutes (void) const + inline double GetMinutes () const { return ToDouble (Time::MIN); } - inline double GetSeconds (void) const + inline double GetSeconds () const { return ToDouble (Time::S); } - inline int64_t GetMilliSeconds (void) const + inline int64_t GetMilliSeconds () const { return ToInteger (Time::MS); } - inline int64_t GetMicroSeconds (void) const + inline int64_t GetMicroSeconds () const { return ToInteger (Time::US); } - inline int64_t GetNanoSeconds (void) const + inline int64_t GetNanoSeconds () const { return ToInteger (Time::NS); } - inline int64_t GetPicoSeconds (void) const + inline int64_t GetPicoSeconds () const { return ToInteger (Time::PS); } - inline int64_t GetFemtoSeconds (void) const + inline int64_t GetFemtoSeconds () const { return ToInteger (Time::FS); } @@ -413,15 +413,15 @@ public: * Get the raw time value, in the current resolution unit. * \returns The raw time value */ - inline int64_t GetTimeStep (void) const + inline int64_t GetTimeStep () const { return m_data; } - inline double GetDouble (void) const + inline double GetDouble () const { return static_cast (m_data); } - inline int64_t GetInteger (void) const + inline int64_t GetInteger () const { return GetTimeStep (); } @@ -439,7 +439,7 @@ public: /** * \returns The current global resolution. */ - static enum Unit GetResolution (void); + static enum Unit GetResolution (); /** @@ -602,7 +602,7 @@ private: * * \return A pointer to the current Resolution */ - static inline struct Resolution * PeekResolution (void) + static inline struct Resolution * PeekResolution () { static struct Time::Resolution& resolution{SetDefaultNsResolution()}; return &resolution; @@ -623,7 +623,7 @@ private: * * \return The Resolution object for the default resolution. */ - static struct Resolution& SetDefaultNsResolution (void); + static struct Resolution& SetDefaultNsResolution (); /** * Set the current Resolution. * @@ -1327,7 +1327,7 @@ Ptr MakeTimeChecker (const Time min, const Time max); * \return The AttributeChecker */ inline -Ptr MakeTimeChecker (void) +Ptr MakeTimeChecker () { return MakeTimeChecker (Time::Min (), Time::Max ()); } diff --git a/src/core/model/object-base.cc b/src/core/model/object-base.cc index d6ccf6215..a5a891ac9 100644 --- a/src/core/model/object-base.cc +++ b/src/core/model/object-base.cc @@ -107,7 +107,7 @@ EnvDictionary (std::string key) * \return The TypeId for ObjectBase. */ static TypeId -GetObjectIid (void) +GetObjectIid () { NS_LOG_FUNCTION_NOARGS (); TypeId tid = TypeId ("ns3::ObjectBase"); @@ -117,7 +117,7 @@ GetObjectIid (void) } TypeId -ObjectBase::GetTypeId (void) +ObjectBase::GetTypeId () { NS_LOG_FUNCTION_NOARGS (); static TypeId tid = GetObjectIid (); @@ -130,7 +130,7 @@ ObjectBase::~ObjectBase () } void -ObjectBase::NotifyConstructionCompleted (void) +ObjectBase::NotifyConstructionCompleted () { NS_LOG_FUNCTION (this); } diff --git a/src/core/model/object-base.h b/src/core/model/object-base.h index 197eaf511..9ac36b0a2 100644 --- a/src/core/model/object-base.h +++ b/src/core/model/object-base.h @@ -138,7 +138,7 @@ namespace ns3 { * NS_OBJECT_TEMPLATE_CLASS_DEFINE macro. */ template -std::string DoGetTemplateClassName (void); +std::string DoGetTemplateClassName (); /** * \brief Helper function to get the name (as a string) of the type @@ -146,7 +146,7 @@ std::string DoGetTemplateClassName (void); * \return the name of the type of a template class as a string */ template -std::string GetTemplateClassName (void) +std::string GetTemplateClassName () { return DoGetTemplateClassName (); } @@ -170,7 +170,7 @@ public: * Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * Virtual destructor. @@ -187,7 +187,7 @@ public: * \return The TypeId associated to the most-derived type * of this instance. */ - virtual TypeId GetInstanceTypeId (void) const = 0; + virtual TypeId GetInstanceTypeId () const = 0; /** * @@ -297,7 +297,7 @@ protected: * of this event but if they do this, they must chain up to their * parent's NotifyConstructionCompleted method. */ - virtual void NotifyConstructionCompleted (void); + virtual void NotifyConstructionCompleted (); /** * Complete construction of ObjectBase; invoked by derived classes. * diff --git a/src/core/model/object-factory.cc b/src/core/model/object-factory.cc index 9c88524cb..92c412612 100644 --- a/src/core/model/object-factory.cc +++ b/src/core/model/object-factory.cc @@ -49,7 +49,7 @@ ObjectFactory::SetTypeId (std::string tid) m_tid = TypeId::LookupByName (tid); } bool -ObjectFactory::IsTypeIdSet (void) const +ObjectFactory::IsTypeIdSet () const { if (m_tid.GetUid () != 0) { @@ -82,14 +82,14 @@ ObjectFactory::DoSet (const std::string &name, const AttributeValue &value) } TypeId -ObjectFactory::GetTypeId (void) const +ObjectFactory::GetTypeId () const { NS_LOG_FUNCTION (this); return m_tid; } Ptr -ObjectFactory::Create (void) const +ObjectFactory::Create () const { NS_LOG_FUNCTION (this); Callback cb = m_tid.GetConstructor (); diff --git a/src/core/model/object-factory.h b/src/core/model/object-factory.h index f0ad5ca99..95e91dd9e 100644 --- a/src/core/model/object-factory.h +++ b/src/core/model/object-factory.h @@ -82,7 +82,7 @@ public: * * \return true if a TypeId has been configured to the ObjectFactory */ - bool IsTypeIdSet (void) const; + bool IsTypeIdSet () const; /** * Set an attribute to be set during construction. @@ -102,21 +102,21 @@ public: * Base case to stop the recursion performed by the templated version of this * method. */ - void Set (void) + void Set () { } /** * Get the TypeId which will be created by this ObjectFactory. * \returns The currently-selected TypeId. */ - TypeId GetTypeId (void) const; + TypeId GetTypeId () const; /** * Create an Object instance of the configured TypeId. * * \returns A new object instance. */ - Ptr Create (void) const; + Ptr Create () const; /** * Create an Object instance of the requested type. * @@ -128,7 +128,7 @@ public: * \returns A new object instance. */ template - Ptr Create (void) const; + Ptr Create () const; private: /** @@ -204,7 +204,7 @@ namespace ns3 { template Ptr -ObjectFactory::Create (void) const +ObjectFactory::Create () const { Ptr object = Create (); return object->GetObject (); diff --git a/src/core/model/object-map.h b/src/core/model/object-map.h index 4cbb7ca2f..66a536101 100644 --- a/src/core/model/object-map.h +++ b/src/core/model/object-map.h @@ -50,7 +50,7 @@ MakeObjectMapAccessor (U T::*memberVariable); // Documentation generated by print-introspected-doxygen.cc template -Ptr MakeObjectMapChecker (void); +Ptr MakeObjectMapChecker (); /** * \ingroup attribute_ObjectMap @@ -59,7 +59,7 @@ Ptr MakeObjectMapChecker (void); template Ptr MakeObjectMapAccessor (Ptr (T::*get)(INDEX) const, - INDEX (T::*getN)(void) const); + INDEX (T::*getN)() const); /** * \ingroup attribute_ObjectMap @@ -67,7 +67,7 @@ MakeObjectMapAccessor (Ptr (T::*get)(INDEX) const, */ template Ptr -MakeObjectMapAccessor (INDEX (T::*getN)(void) const, +MakeObjectMapAccessor (INDEX (T::*getN)() const, Ptr (T::*get)(INDEX) const); @@ -117,7 +117,7 @@ MakeObjectMapAccessor (U T::*memberVector) } template -Ptr MakeObjectMapChecker (void) +Ptr MakeObjectMapChecker () { return MakeObjectPtrContainerChecker (); } @@ -125,14 +125,14 @@ Ptr MakeObjectMapChecker (void) template Ptr MakeObjectMapAccessor (Ptr (T::*get)(INDEX) const, - INDEX (T::*getN)(void) const) + INDEX (T::*getN)() const) { return MakeObjectPtrContainerAccessor (get, getN); } template Ptr -MakeObjectMapAccessor (INDEX (T::*getN)(void) const, +MakeObjectMapAccessor (INDEX (T::*getN)() const, Ptr (T::*get)(INDEX) const) { return MakeObjectPtrContainerAccessor (get, getN); diff --git a/src/core/model/object-ptr-container.cc b/src/core/model/object-ptr-container.cc index 94a1aedb6..b0a2f1875 100644 --- a/src/core/model/object-ptr-container.cc +++ b/src/core/model/object-ptr-container.cc @@ -36,19 +36,19 @@ ObjectPtrContainerValue::ObjectPtrContainerValue () } ObjectPtrContainerValue::Iterator -ObjectPtrContainerValue::Begin (void) const +ObjectPtrContainerValue::Begin () const { NS_LOG_FUNCTION (this); return m_objects.begin (); } ObjectPtrContainerValue::Iterator -ObjectPtrContainerValue::End (void) const +ObjectPtrContainerValue::End () const { NS_LOG_FUNCTION (this); return m_objects.end (); } std::size_t -ObjectPtrContainerValue::GetN (void) const +ObjectPtrContainerValue::GetN () const { NS_LOG_FUNCTION (this); return m_objects.size (); @@ -67,7 +67,7 @@ ObjectPtrContainerValue::Get (std::size_t i) const } Ptr -ObjectPtrContainerValue::Copy (void) const +ObjectPtrContainerValue::Copy () const { NS_LOG_FUNCTION (this); return ns3::Create (*this); @@ -128,13 +128,13 @@ ObjectPtrContainerAccessor::Get (const ObjectBase * object, AttributeValue &valu return true; } bool -ObjectPtrContainerAccessor::HasGetter (void) const +ObjectPtrContainerAccessor::HasGetter () const { NS_LOG_FUNCTION (this); return true; } bool -ObjectPtrContainerAccessor::HasSetter (void) const +ObjectPtrContainerAccessor::HasSetter () const { NS_LOG_FUNCTION (this); return false; diff --git a/src/core/model/object-ptr-container.h b/src/core/model/object-ptr-container.h index aea23cca6..8ee4a849d 100644 --- a/src/core/model/object-ptr-container.h +++ b/src/core/model/object-ptr-container.h @@ -56,19 +56,19 @@ public: * * \returns An iterator to the first Object. */ - Iterator Begin (void) const; + Iterator Begin () const; /** * Get an iterator to the _past-the-end_ Object. * * \returns An iterator to the _past-the-end_ Object. */ - Iterator End (void) const; + Iterator End () const; /** * Get the number of Objects. * * \returns The number of objects. */ - std::size_t GetN (void) const; + std::size_t GetN () const; /** * Get a specific Object. * @@ -82,7 +82,7 @@ public: * * \returns A copy of this container. */ - virtual Ptr Copy (void) const; + virtual Ptr Copy () const; /** * Serialize each of the Object pointers to a string. * @@ -126,7 +126,7 @@ private: template Ptr MakeObjectPtrContainerAccessor (Ptr (T::*get)(INDEX) const, - INDEX (T::*getN)(void) const); + INDEX (T::*getN)() const); /** * \ingroup attribute_ObjectPtrContainer @@ -145,7 +145,7 @@ MakeObjectPtrContainerAccessor (Ptr (T::*get)(INDEX) const, */ template Ptr -MakeObjectPtrContainerAccessor (INDEX (T::*getN)(void) const, +MakeObjectPtrContainerAccessor (INDEX (T::*getN)() const, Ptr (T::*get)(INDEX) const); class ObjectPtrContainerChecker : public AttributeChecker @@ -155,11 +155,11 @@ public: * Get the TypeId of the container class type. * \returns The class TypeId. */ - virtual TypeId GetItemTypeId (void) const = 0; + virtual TypeId GetItemTypeId () const = 0; }; template -Ptr MakeObjectPtrContainerChecker (void); +Ptr MakeObjectPtrContainerChecker (); } // namespace ns3 @@ -177,7 +177,7 @@ template class ObjectPtrContainerChecker : public ns3::ObjectPtrContainerChecker { public: - virtual TypeId GetItemTypeId (void) const + virtual TypeId GetItemTypeId () const { return T::GetTypeId (); } @@ -185,19 +185,19 @@ public: { return dynamic_cast (&value) != 0; } - virtual std::string GetValueTypeName (void) const + virtual std::string GetValueTypeName () const { return "ns3::ObjectPtrContainerValue"; } - virtual bool HasUnderlyingTypeInformation (void) const + virtual bool HasUnderlyingTypeInformation () const { return true; } - virtual std::string GetUnderlyingTypeInformation (void) const + virtual std::string GetUnderlyingTypeInformation () const { return "ns3::Ptr< " + T::GetTypeId ().GetName () + " >"; } - virtual Ptr Create (void) const + virtual Ptr Create () const { return ns3::Create (); } @@ -226,8 +226,8 @@ class ObjectPtrContainerAccessor : public AttributeAccessor public: virtual bool Set (ObjectBase * object, const AttributeValue &value) const; virtual bool Get (const ObjectBase * object, AttributeValue &value) const; - virtual bool HasGetter (void) const; - virtual bool HasSetter (void) const; + virtual bool HasGetter () const; + virtual bool HasSetter () const; private: /** @@ -252,7 +252,7 @@ private: template Ptr MakeObjectPtrContainerAccessor (Ptr (T::*get)(INDEX) const, - INDEX (T::*getN)(void) const) + INDEX (T::*getN)() const) { struct MemberGetters : public ObjectPtrContainerAccessor { @@ -273,7 +273,7 @@ MakeObjectPtrContainerAccessor (Ptr (T::*get)(INDEX) const, return (obj->*m_get)(i); } Ptr (T::*m_get)(INDEX) const; - INDEX (T::*m_getN)(void) const; + INDEX (T::*m_getN)() const; } *spec = new MemberGetters (); spec->m_get = get; spec->m_getN = getN; @@ -282,14 +282,14 @@ MakeObjectPtrContainerAccessor (Ptr (T::*get)(INDEX) const, template Ptr -MakeObjectPtrContainerAccessor (INDEX (T::*getN)(void) const, +MakeObjectPtrContainerAccessor (INDEX (T::*getN)() const, Ptr (T::*get)(INDEX) const) { return MakeObjectPtrContainerAccessor (get, getN); } template -Ptr MakeObjectPtrContainerChecker (void) +Ptr MakeObjectPtrContainerChecker () { return Create > (); } diff --git a/src/core/model/object-vector.h b/src/core/model/object-vector.h index fcd6f234c..0b2320f7e 100644 --- a/src/core/model/object-vector.h +++ b/src/core/model/object-vector.h @@ -51,7 +51,7 @@ MakeObjectVectorAccessor (U T::*memberVariable); // Documentation generated by print-introspected-doxygen.cc template Ptr -MakeObjectVectorChecker (void); +MakeObjectVectorChecker (); /** * \ingroup attribute_ObjectVector @@ -60,7 +60,7 @@ MakeObjectVectorChecker (void); template Ptr MakeObjectVectorAccessor (Ptr (T::*get)(INDEX) const, - INDEX (T::*getN)(void) const); + INDEX (T::*getN)() const); /** * \ingroup attribute_ObjectVector @@ -68,7 +68,7 @@ MakeObjectVectorAccessor (Ptr (T::*get)(INDEX) const, */ template Ptr -MakeObjectVectorAccessor (INDEX (T::*getN)(void) const, +MakeObjectVectorAccessor (INDEX (T::*getN)() const, Ptr (T::*get)(INDEX) const); @@ -118,7 +118,7 @@ MakeObjectVectorAccessor (U T::*memberVector) } template -Ptr MakeObjectVectorChecker (void) +Ptr MakeObjectVectorChecker () { return MakeObjectPtrContainerChecker (); } @@ -126,14 +126,14 @@ Ptr MakeObjectVectorChecker (void) template Ptr MakeObjectVectorAccessor (Ptr (T::*get)(INDEX) const, - INDEX (T::*getN)(void) const) + INDEX (T::*getN)() const) { return MakeObjectPtrContainerAccessor (get, getN); } template Ptr -MakeObjectVectorAccessor (INDEX (T::*getN)(void) const, +MakeObjectVectorAccessor (INDEX (T::*getN)() const, Ptr (T::*get)(INDEX) const) { return MakeObjectPtrContainerAccessor (get, getN); diff --git a/src/core/model/object.cc b/src/core/model/object.cc index a99476066..d253c3cb8 100644 --- a/src/core/model/object.cc +++ b/src/core/model/object.cc @@ -54,13 +54,13 @@ Object::AggregateIterator::AggregateIterator () } bool -Object::AggregateIterator::HasNext (void) const +Object::AggregateIterator::HasNext () const { NS_LOG_FUNCTION (this); return m_current < m_object->m_aggregates->n; } Ptr -Object::AggregateIterator::Next (void) +Object::AggregateIterator::Next () { NS_LOG_FUNCTION (this); Object *object = m_object->m_aggregates->buffer[m_current]; @@ -76,14 +76,14 @@ Object::AggregateIterator::AggregateIterator (Ptr object) TypeId -Object::GetInstanceTypeId (void) const +Object::GetInstanceTypeId () const { NS_LOG_FUNCTION (this); return m_tid; } TypeId -Object::GetTypeId (void) +Object::GetTypeId () { static TypeId tid = TypeId ("ns3::Object") .SetParent () @@ -180,7 +180,7 @@ Object::DoGetObject (TypeId tid) const return 0; } void -Object::Initialize (void) +Object::Initialize () { /** * Note: the code here is a bit tricky because we need to protect ourselves from @@ -205,13 +205,13 @@ restart: } } bool -Object::IsInitialized (void) const +Object::IsInitialized () const { NS_LOG_FUNCTION (this); return m_initialized; } void -Object::Dispose (void) +Object::Dispose () { /** * Note: the code here is a bit tricky because we need to protect ourselves from @@ -328,7 +328,7 @@ Object::NotifyNewAggregate () } Object::AggregateIterator -Object::GetAggregateIterator (void) const +Object::GetAggregateIterator () const { NS_LOG_FUNCTION (this); return AggregateIterator (this); @@ -343,21 +343,21 @@ Object::SetTypeId (TypeId tid) } void -Object::DoDispose (void) +Object::DoDispose () { NS_LOG_FUNCTION (this); NS_ASSERT (!m_disposed); } void -Object::DoInitialize (void) +Object::DoInitialize () { NS_LOG_FUNCTION (this); NS_ASSERT (!m_initialized); } bool -Object::Check (void) const +Object::Check () const { NS_LOG_FUNCTION (this); return (GetReferenceCount () > 0); @@ -371,7 +371,7 @@ Object::Check (void) const * check the aggregate reference count. */ bool -Object::CheckLoose (void) const +Object::CheckLoose () const { NS_LOG_FUNCTION (this); bool nonZeroRefCount = false; @@ -388,7 +388,7 @@ Object::CheckLoose (void) const return nonZeroRefCount; } void -Object::DoDelete (void) +Object::DoDelete () { // check if we really need to die NS_LOG_FUNCTION (this); diff --git a/src/core/model/object.h b/src/core/model/object.h index db062d636..08779a3d6 100644 --- a/src/core/model/object.h +++ b/src/core/model/object.h @@ -91,7 +91,7 @@ public: * \brief Register this type. * \return The Object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Iterate over the Objects aggregated to an ns3::Object. @@ -113,14 +113,14 @@ public: * \returns \c true if Next() can be called and return a non-null * pointer, \c false otherwise. */ - bool HasNext (void) const; + bool HasNext () const; /** * Get the next Aggregated Object. * * \returns The next aggregated Object. */ - Ptr Next (void); + Ptr Next (); private: /** Object needs access. */ @@ -143,7 +143,7 @@ public: /** Destructor. */ virtual ~Object (); - virtual TypeId GetInstanceTypeId (void) const; + virtual TypeId GetInstanceTypeId () const; /** * Get a pointer to the requested aggregated Object. If the type of object @@ -154,7 +154,7 @@ public: * if it could not be found. */ template - inline Ptr GetObject (void) const; + inline Ptr GetObject () const; /** * Get a pointer to the requested aggregated Object by TypeId. If the * TypeId argument is ns3::Object, a Ptr to the calling object is returned. @@ -180,7 +180,7 @@ public: * * This method is typically used to break reference cycles. */ - void Dispose (void); + void Dispose (); /** * Aggregate two Objects together. * @@ -208,7 +208,7 @@ public: * iterator will be empty and AggregateIterator::HasNext() will * always return \c false. */ - AggregateIterator GetAggregateIterator (void) const; + AggregateIterator GetAggregateIterator () const; /** * Invoke DoInitialize on all Objects aggregated to this one. @@ -220,7 +220,7 @@ public: * * \sa DoInitialize() */ - void Initialize (void); + void Initialize (); /** * Check if the object has been initialized. @@ -228,7 +228,7 @@ public: * \brief Check if the object has been initialized. * \returns \c true if the object has been initialized. */ - bool IsInitialized (void) const; + bool IsInitialized () const; protected: /** @@ -244,7 +244,7 @@ protected: * It is safe to call GetObject() and AggregateObject() from within * this method. */ - virtual void NotifyNewAggregate (void); + virtual void NotifyNewAggregate (); /** * Initialize() implementation. * @@ -256,7 +256,7 @@ protected: * to their parent's implementation once they are done. It is * safe to call GetObject() and AggregateObject() from within this method. */ - virtual void DoInitialize (void); + virtual void DoInitialize (); /** * Destructor implementation. * @@ -272,7 +272,7 @@ protected: * * It is safe to call GetObject() from within this method. */ - virtual void DoDispose (void); + virtual void DoDispose (); /** * Copy an Object. * @@ -361,7 +361,7 @@ private: * Verify that this Object is still live, by checking it's reference count. * \return \c true if the reference count is non zero. */ - bool Check (void) const; + bool Check () const; /** * Check if any aggregated Objects have non-zero reference counts. * @@ -374,7 +374,7 @@ private: * manipulating an Object with a refcount of zero. So, instead we * check the aggregate reference count. */ - bool CheckLoose (void) const; + bool CheckLoose () const; /** * Set the TypeId of this Object. @@ -411,7 +411,7 @@ private: * have a zero refcount. If yes, the Object and all * its aggregates are deleted. If not, nothing is done. */ - void DoDelete (void); + void DoDelete (); /** * Identifies the type of this Object instance. diff --git a/src/core/model/pair.h b/src/core/model/pair.h index c98a73ff9..546c3a808 100644 --- a/src/core/model/pair.h +++ b/src/core/model/pair.h @@ -74,7 +74,7 @@ public: PairValue (const result_type &value); // "import" constructor // Inherited - Ptr Copy (void) const; + Ptr Copy () const; bool DeserializeFromString (std::string value, Ptr checker); std::string SerializeToString (Ptr checker) const; @@ -85,7 +85,7 @@ public: * a pair of Ptr where AV is a class derived from AttributeValue. * \return stored value as std::pair. */ - result_type Get (void) const; + result_type Get () const; /* Documented by print-introspected-doxygen.cc */ void Set (const result_type &value); @@ -115,7 +115,7 @@ public: * * \return std::pair with AttributeChecker for each of abscissa and ordinate. */ - virtual checker_pair_type GetCheckers (void) const = 0; + virtual checker_pair_type GetCheckers () const = 0; }; /** @@ -150,7 +150,7 @@ MakePairChecker (Ptr firstchecker, Ptr -Ptr MakePairChecker (void); +Ptr MakePairChecker (); template Ptr MakePairAccessor (T1 a1); @@ -177,7 +177,7 @@ class PairChecker : public ns3::PairChecker { public: /** Default c'tor. */ - PairChecker (void); + PairChecker (); /** * Construct from a pair of AttributeChecker's. * \param firstchecker The AttributeChecker for first. @@ -185,7 +185,7 @@ public: */ PairChecker (Ptr firstchecker, Ptr secondchecker); void SetCheckers (Ptr firstchecker, Ptr secondchecker); - typename ns3::PairChecker::checker_pair_type GetCheckers (void) const; + typename ns3::PairChecker::checker_pair_type GetCheckers () const; private: /** The first checker. */ @@ -195,7 +195,7 @@ private: }; template -PairChecker::PairChecker (void) +PairChecker::PairChecker () : m_firstchecker (0), m_secondchecker (0) {} @@ -216,7 +216,7 @@ PairChecker::SetCheckers (Ptr firstchecker, Ptr typename ns3::PairChecker::checker_pair_type -PairChecker::GetCheckers (void) const +PairChecker::GetCheckers () const { return std::make_pair (m_firstchecker, m_secondchecker); } @@ -242,7 +242,7 @@ MakePairChecker (Ptr firstchecker, Ptr Ptr -MakePairChecker (void) +MakePairChecker () { std::string pairName; std::string underlyingType; @@ -277,7 +277,7 @@ PairValue::PairValue (const typename PairValue::result_type &value) template Ptr -PairValue::Copy (void) const +PairValue::Copy () const { auto p = Create > (); // deep copy if non-null @@ -327,7 +327,7 @@ PairValue::SerializeToString (Ptr checker) const template typename PairValue::result_type -PairValue::Get (void) const +PairValue::Get () const { return std::make_pair (m_value.first->Get (), m_value.second->Get ()); } diff --git a/src/core/model/pointer.cc b/src/core/model/pointer.cc index 69e3550fb..e62b6fc61 100644 --- a/src/core/model/pointer.cc +++ b/src/core/model/pointer.cc @@ -52,14 +52,14 @@ PointerValue::SetObject (Ptr object) } Ptr -PointerValue::GetObject (void) const +PointerValue::GetObject () const { NS_LOG_FUNCTION (this); return m_value; } Ptr -PointerValue::Copy (void) const +PointerValue::Copy () const { NS_LOG_FUNCTION (this); return Create (*this); diff --git a/src/core/model/pointer.h b/src/core/model/pointer.h index c9938e56a..8ee455491 100644 --- a/src/core/model/pointer.h +++ b/src/core/model/pointer.h @@ -56,7 +56,7 @@ public: * Get the Object referenced by the PointerValue. * \returns The Object. */ - Ptr GetObject (void) const; + Ptr GetObject () const; /** * Construct this PointerValue by referencing an explicit Object. @@ -80,12 +80,12 @@ public: /** \tparam T \explicit The type to cast to. */ template - Ptr Get (void) const; + Ptr Get () const; template bool GetAccessor (Ptr &value) const; - virtual Ptr Copy (void) const; + virtual Ptr Copy () const; virtual std::string SerializeToString (Ptr checker) const; virtual bool DeserializeFromString (std::string value, Ptr checker); @@ -102,7 +102,7 @@ public: * Get the TypeId of the base type. * \returns The base TypeId. */ - virtual TypeId GetPointeeTypeId (void) const = 0; + virtual TypeId GetPointeeTypeId () const = 0; }; /** @@ -111,7 +111,7 @@ public: * \returns The PointerChecker. */ template -Ptr MakePointerChecker (void); +Ptr MakePointerChecker (); } // namespace ns3 @@ -147,20 +147,20 @@ class PointerChecker : public ns3::PointerChecker } return true; } - virtual std::string GetValueTypeName (void) const + virtual std::string GetValueTypeName () const { return "ns3::PointerValue"; } - virtual bool HasUnderlyingTypeInformation (void) const + virtual bool HasUnderlyingTypeInformation () const { return true; } - virtual std::string GetUnderlyingTypeInformation (void) const + virtual std::string GetUnderlyingTypeInformation () const { TypeId tid = T::GetTypeId (); return "ns3::Ptr< " + tid.GetName () + " >"; } - virtual Ptr Create (void) const + virtual Ptr Create () const { return ns3::Create (); } @@ -175,7 +175,7 @@ class PointerChecker : public ns3::PointerChecker *dst = *src; return true; } - virtual TypeId GetPointeeTypeId (void) const + virtual TypeId GetPointeeTypeId () const { return T::GetTypeId (); } @@ -198,7 +198,7 @@ PointerValue::Set (const Ptr &object) template Ptr -PointerValue::Get (void) const +PointerValue::Get () const { T *v = dynamic_cast (PeekPointer (m_value)); return v; @@ -228,7 +228,7 @@ ATTRIBUTE_ACCESSOR_DEFINE (Pointer); template Ptr -MakePointerChecker (void) +MakePointerChecker () { return Create > (); } diff --git a/src/core/model/priority-queue-scheduler.cc b/src/core/model/priority-queue-scheduler.cc index 92f40257a..92e90799a 100644 --- a/src/core/model/priority-queue-scheduler.cc +++ b/src/core/model/priority-queue-scheduler.cc @@ -39,7 +39,7 @@ NS_LOG_COMPONENT_DEFINE ("PriorityQueueScheduler"); NS_OBJECT_ENSURE_REGISTERED (PriorityQueueScheduler); TypeId -PriorityQueueScheduler::GetTypeId (void) +PriorityQueueScheduler::GetTypeId () { static TypeId tid = TypeId ("ns3::PriorityQueueScheduler") .SetParent () @@ -66,21 +66,21 @@ PriorityQueueScheduler::Insert (const Event &ev) } bool -PriorityQueueScheduler::IsEmpty (void) const +PriorityQueueScheduler::IsEmpty () const { NS_LOG_FUNCTION (this); return m_queue.empty (); } Scheduler::Event -PriorityQueueScheduler::PeekNext (void) const +PriorityQueueScheduler::PeekNext () const { NS_LOG_FUNCTION (this); return m_queue.top (); } Scheduler::Event -PriorityQueueScheduler::RemoveNext (void) +PriorityQueueScheduler::RemoveNext () { NS_LOG_FUNCTION (this); Scheduler::Event ev = m_queue.top (); diff --git a/src/core/model/priority-queue-scheduler.h b/src/core/model/priority-queue-scheduler.h index 607fc5a13..36452e7cf 100644 --- a/src/core/model/priority-queue-scheduler.h +++ b/src/core/model/priority-queue-scheduler.h @@ -68,7 +68,7 @@ public: * Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ PriorityQueueScheduler (); @@ -77,9 +77,9 @@ public: // Inherited virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty (void) const; - virtual Scheduler::Event PeekNext (void) const; - virtual Scheduler::Event RemoveNext (void); + virtual bool IsEmpty () const; + virtual Scheduler::Event PeekNext () const; + virtual Scheduler::Event RemoveNext (); virtual void Remove (const Scheduler::Event &ev); private: diff --git a/src/core/model/ptr.h b/src/core/model/ptr.h index 5a3b9fcd4..16bdc166b 100644 --- a/src/core/model/ptr.h +++ b/src/core/model/ptr.h @@ -129,7 +129,7 @@ private: friend U * PeekPointer (const Ptr &p); /** Mark this as a a reference by incrementing the reference count. */ - inline void Acquire (void) const; + inline void Acquire () const; public: /** Create an empty smart pointer */ @@ -660,7 +660,7 @@ Ptr Copy (Ptr object) template void -Ptr::Acquire (void) const +Ptr::Acquire () const { if (m_ptr != 0) { diff --git a/src/core/model/random-variable-stream.cc b/src/core/model/random-variable-stream.cc index 4342e3a85..5d9d827c2 100644 --- a/src/core/model/random-variable-stream.cc +++ b/src/core/model/random-variable-stream.cc @@ -50,7 +50,7 @@ NS_LOG_COMPONENT_DEFINE ("RandomVariableStream"); NS_OBJECT_ENSURE_REGISTERED (RandomVariableStream); TypeId -RandomVariableStream::GetTypeId (void) +RandomVariableStream::GetTypeId () { static TypeId tid = TypeId ("ns3::RandomVariableStream") .SetParent () @@ -90,7 +90,7 @@ RandomVariableStream::SetAntithetic (bool isAntithetic) m_isAntithetic = isAntithetic; } bool -RandomVariableStream::IsAntithetic (void) const +RandomVariableStream::IsAntithetic () const { NS_LOG_FUNCTION (this); return m_isAntithetic; @@ -125,14 +125,14 @@ RandomVariableStream::SetStream (int64_t stream) m_stream = stream; } int64_t -RandomVariableStream::GetStream (void) const +RandomVariableStream::GetStream () const { NS_LOG_FUNCTION (this); return m_stream; } RngStream * -RandomVariableStream::Peek (void) const +RandomVariableStream::Peek () const { NS_LOG_FUNCTION (this); return m_rng; @@ -141,7 +141,7 @@ RandomVariableStream::Peek (void) const NS_OBJECT_ENSURE_REGISTERED (UniformRandomVariable); TypeId -UniformRandomVariable::GetTypeId (void) +UniformRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::UniformRandomVariable") .SetParent() @@ -165,13 +165,13 @@ UniformRandomVariable::UniformRandomVariable () } double -UniformRandomVariable::GetMin (void) const +UniformRandomVariable::GetMin () const { NS_LOG_FUNCTION (this); return m_min; } double -UniformRandomVariable::GetMax (void) const +UniformRandomVariable::GetMax () const { NS_LOG_FUNCTION (this); return m_max; @@ -197,13 +197,13 @@ UniformRandomVariable::GetInteger (uint32_t min, uint32_t max) } double -UniformRandomVariable::GetValue (void) +UniformRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_min, m_max); } uint32_t -UniformRandomVariable::GetInteger (void) +UniformRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_min, m_max + 1); @@ -212,7 +212,7 @@ UniformRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (ConstantRandomVariable); TypeId -ConstantRandomVariable::GetTypeId (void) +ConstantRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::ConstantRandomVariable") .SetParent() @@ -232,7 +232,7 @@ ConstantRandomVariable::ConstantRandomVariable () } double -ConstantRandomVariable::GetConstant (void) const +ConstantRandomVariable::GetConstant () const { NS_LOG_FUNCTION (this); return m_constant; @@ -252,13 +252,13 @@ ConstantRandomVariable::GetInteger (uint32_t constant) } double -ConstantRandomVariable::GetValue (void) +ConstantRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_constant); } uint32_t -ConstantRandomVariable::GetInteger (void) +ConstantRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_constant); @@ -267,7 +267,7 @@ ConstantRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (SequentialRandomVariable); TypeId -SequentialRandomVariable::GetTypeId (void) +SequentialRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::SequentialRandomVariable") .SetParent() @@ -303,35 +303,35 @@ SequentialRandomVariable::SequentialRandomVariable () } double -SequentialRandomVariable::GetMin (void) const +SequentialRandomVariable::GetMin () const { NS_LOG_FUNCTION (this); return m_min; } double -SequentialRandomVariable::GetMax (void) const +SequentialRandomVariable::GetMax () const { NS_LOG_FUNCTION (this); return m_max; } Ptr -SequentialRandomVariable::GetIncrement (void) const +SequentialRandomVariable::GetIncrement () const { NS_LOG_FUNCTION (this); return m_increment; } uint32_t -SequentialRandomVariable::GetConsecutive (void) const +SequentialRandomVariable::GetConsecutive () const { NS_LOG_FUNCTION (this); return m_consecutive; } double -SequentialRandomVariable::GetValue (void) +SequentialRandomVariable::GetValue () { // Set the current sequence value if it hasn't been set. NS_LOG_FUNCTION (this); @@ -357,7 +357,7 @@ SequentialRandomVariable::GetValue (void) } uint32_t -SequentialRandomVariable::GetInteger (void) +SequentialRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (); @@ -366,7 +366,7 @@ SequentialRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (ExponentialRandomVariable); TypeId -ExponentialRandomVariable::GetTypeId (void) +ExponentialRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::ExponentialRandomVariable") .SetParent() @@ -390,13 +390,13 @@ ExponentialRandomVariable::ExponentialRandomVariable () } double -ExponentialRandomVariable::GetMean (void) const +ExponentialRandomVariable::GetMean () const { NS_LOG_FUNCTION (this); return m_mean; } double -ExponentialRandomVariable::GetBound (void) const +ExponentialRandomVariable::GetBound () const { NS_LOG_FUNCTION (this); return m_bound; @@ -433,13 +433,13 @@ ExponentialRandomVariable::GetInteger (uint32_t mean, uint32_t bound) } double -ExponentialRandomVariable::GetValue (void) +ExponentialRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_mean, m_bound); } uint32_t -ExponentialRandomVariable::GetInteger (void) +ExponentialRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_mean, m_bound); @@ -448,7 +448,7 @@ ExponentialRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (ParetoRandomVariable); TypeId -ParetoRandomVariable::GetTypeId (void) +ParetoRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::ParetoRandomVariable") .SetParent() @@ -477,21 +477,21 @@ ParetoRandomVariable::ParetoRandomVariable () } double -ParetoRandomVariable::GetScale (void) const +ParetoRandomVariable::GetScale () const { NS_LOG_FUNCTION (this); return m_scale; } double -ParetoRandomVariable::GetShape (void) const +ParetoRandomVariable::GetShape () const { NS_LOG_FUNCTION (this); return m_shape; } double -ParetoRandomVariable::GetBound (void) const +ParetoRandomVariable::GetBound () const { NS_LOG_FUNCTION (this); return m_bound; @@ -530,13 +530,13 @@ ParetoRandomVariable::GetInteger (uint32_t scale, uint32_t shape, uint32_t bound } double -ParetoRandomVariable::GetValue (void) +ParetoRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_scale, m_shape, m_bound); } uint32_t -ParetoRandomVariable::GetInteger (void) +ParetoRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_scale, m_shape, m_bound); @@ -545,7 +545,7 @@ ParetoRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (WeibullRandomVariable); TypeId -WeibullRandomVariable::GetTypeId (void) +WeibullRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::WeibullRandomVariable") .SetParent() @@ -574,19 +574,19 @@ WeibullRandomVariable::WeibullRandomVariable () } double -WeibullRandomVariable::GetScale (void) const +WeibullRandomVariable::GetScale () const { NS_LOG_FUNCTION (this); return m_scale; } double -WeibullRandomVariable::GetShape (void) const +WeibullRandomVariable::GetShape () const { NS_LOG_FUNCTION (this); return m_shape; } double -WeibullRandomVariable::GetBound (void) const +WeibullRandomVariable::GetBound () const { NS_LOG_FUNCTION (this); return m_bound; @@ -624,13 +624,13 @@ WeibullRandomVariable::GetInteger (uint32_t scale, uint32_t shape, uint32_t boun } double -WeibullRandomVariable::GetValue (void) +WeibullRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_scale, m_shape, m_bound); } uint32_t -WeibullRandomVariable::GetInteger (void) +WeibullRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_scale, m_shape, m_bound); @@ -641,7 +641,7 @@ NS_OBJECT_ENSURE_REGISTERED (NormalRandomVariable); const double NormalRandomVariable::INFINITE_VALUE = 1e307; TypeId -NormalRandomVariable::GetTypeId (void) +NormalRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::NormalRandomVariable") .SetParent() @@ -672,19 +672,19 @@ NormalRandomVariable::NormalRandomVariable () } double -NormalRandomVariable::GetMean (void) const +NormalRandomVariable::GetMean () const { NS_LOG_FUNCTION (this); return m_mean; } double -NormalRandomVariable::GetVariance (void) const +NormalRandomVariable::GetVariance () const { NS_LOG_FUNCTION (this); return m_variance; } double -NormalRandomVariable::GetBound (void) const +NormalRandomVariable::GetBound () const { NS_LOG_FUNCTION (this); return m_bound; @@ -749,13 +749,13 @@ NormalRandomVariable::GetInteger (uint32_t mean, uint32_t variance, uint32_t bou } double -NormalRandomVariable::GetValue (void) +NormalRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_mean, m_variance, m_bound); } uint32_t -NormalRandomVariable::GetInteger (void) +NormalRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_mean, m_variance, m_bound); @@ -764,7 +764,7 @@ NormalRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (LogNormalRandomVariable); TypeId -LogNormalRandomVariable::GetTypeId (void) +LogNormalRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::LogNormalRandomVariable") .SetParent() @@ -789,13 +789,13 @@ LogNormalRandomVariable::LogNormalRandomVariable () } double -LogNormalRandomVariable::GetMu (void) const +LogNormalRandomVariable::GetMu () const { NS_LOG_FUNCTION (this); return m_mu; } double -LogNormalRandomVariable::GetSigma (void) const +LogNormalRandomVariable::GetSigma () const { NS_LOG_FUNCTION (this); return m_sigma; @@ -869,13 +869,13 @@ LogNormalRandomVariable::GetInteger (uint32_t mu, uint32_t sigma) } double -LogNormalRandomVariable::GetValue (void) +LogNormalRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_mu, m_sigma); } uint32_t -LogNormalRandomVariable::GetInteger (void) +LogNormalRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_mu, m_sigma); @@ -884,7 +884,7 @@ LogNormalRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (GammaRandomVariable); TypeId -GammaRandomVariable::GetTypeId (void) +GammaRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::GammaRandomVariable") .SetParent() @@ -911,13 +911,13 @@ GammaRandomVariable::GammaRandomVariable () } double -GammaRandomVariable::GetAlpha (void) const +GammaRandomVariable::GetAlpha () const { NS_LOG_FUNCTION (this); return m_alpha; } double -GammaRandomVariable::GetBeta (void) const +GammaRandomVariable::GetBeta () const { NS_LOG_FUNCTION (this); return m_beta; @@ -999,13 +999,13 @@ GammaRandomVariable::GetInteger (uint32_t alpha, uint32_t beta) } double -GammaRandomVariable::GetValue (void) +GammaRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_alpha, m_beta); } uint32_t -GammaRandomVariable::GetInteger (void) +GammaRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_alpha, m_beta); @@ -1065,7 +1065,7 @@ GammaRandomVariable::GetNormalValue (double mean, double variance, double bound) NS_OBJECT_ENSURE_REGISTERED (ErlangRandomVariable); TypeId -ErlangRandomVariable::GetTypeId (void) +ErlangRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::ErlangRandomVariable") .SetParent() @@ -1089,13 +1089,13 @@ ErlangRandomVariable::ErlangRandomVariable () } uint32_t -ErlangRandomVariable::GetK (void) const +ErlangRandomVariable::GetK () const { NS_LOG_FUNCTION (this); return m_k; } double -ErlangRandomVariable::GetLambda (void) const +ErlangRandomVariable::GetLambda () const { NS_LOG_FUNCTION (this); return m_lambda; @@ -1138,13 +1138,13 @@ ErlangRandomVariable::GetInteger (uint32_t k, uint32_t lambda) } double -ErlangRandomVariable::GetValue (void) +ErlangRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_k, m_lambda); } uint32_t -ErlangRandomVariable::GetInteger (void) +ErlangRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_k, m_lambda); @@ -1177,7 +1177,7 @@ ErlangRandomVariable::GetExponentialValue (double mean, double bound) NS_OBJECT_ENSURE_REGISTERED (TriangularRandomVariable); TypeId -TriangularRandomVariable::GetTypeId (void) +TriangularRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::TriangularRandomVariable") .SetParent() @@ -1206,19 +1206,19 @@ TriangularRandomVariable::TriangularRandomVariable () } double -TriangularRandomVariable::GetMean (void) const +TriangularRandomVariable::GetMean () const { NS_LOG_FUNCTION (this); return m_mean; } double -TriangularRandomVariable::GetMin (void) const +TriangularRandomVariable::GetMin () const { NS_LOG_FUNCTION (this); return m_min; } double -TriangularRandomVariable::GetMax (void) const +TriangularRandomVariable::GetMax () const { NS_LOG_FUNCTION (this); return m_max; @@ -1257,13 +1257,13 @@ TriangularRandomVariable::GetInteger (uint32_t mean, uint32_t min, uint32_t max) } double -TriangularRandomVariable::GetValue (void) +TriangularRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_mean, m_min, m_max); } uint32_t -TriangularRandomVariable::GetInteger (void) +TriangularRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_mean, m_min, m_max); @@ -1272,7 +1272,7 @@ TriangularRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (ZipfRandomVariable); TypeId -ZipfRandomVariable::GetTypeId (void) +ZipfRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::ZipfRandomVariable") .SetParent() @@ -1296,13 +1296,13 @@ ZipfRandomVariable::ZipfRandomVariable () } uint32_t -ZipfRandomVariable::GetN (void) const +ZipfRandomVariable::GetN () const { NS_LOG_FUNCTION (this); return m_n; } double -ZipfRandomVariable::GetAlpha (void) const +ZipfRandomVariable::GetAlpha () const { NS_LOG_FUNCTION (this); return m_alpha; @@ -1348,13 +1348,13 @@ ZipfRandomVariable::GetInteger (uint32_t n, uint32_t alpha) } double -ZipfRandomVariable::GetValue (void) +ZipfRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_n, m_alpha); } uint32_t -ZipfRandomVariable::GetInteger (void) +ZipfRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_n, m_alpha); @@ -1363,7 +1363,7 @@ ZipfRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (ZetaRandomVariable); TypeId -ZetaRandomVariable::GetTypeId (void) +ZetaRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::ZetaRandomVariable") .SetParent() @@ -1383,7 +1383,7 @@ ZetaRandomVariable::ZetaRandomVariable () } double -ZetaRandomVariable::GetAlpha (void) const +ZetaRandomVariable::GetAlpha () const { NS_LOG_FUNCTION (this); return m_alpha; @@ -1432,13 +1432,13 @@ ZetaRandomVariable::GetInteger (uint32_t alpha) } double -ZetaRandomVariable::GetValue (void) +ZetaRandomVariable::GetValue () { NS_LOG_FUNCTION (this); return GetValue (m_alpha); } uint32_t -ZetaRandomVariable::GetInteger (void) +ZetaRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (m_alpha); @@ -1447,7 +1447,7 @@ ZetaRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (DeterministicRandomVariable); TypeId -DeterministicRandomVariable::GetTypeId (void) +DeterministicRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::DeterministicRandomVariable") .SetParent() @@ -1497,7 +1497,7 @@ DeterministicRandomVariable::SetValueArray (double* values, std::size_t length) } double -DeterministicRandomVariable::GetValue (void) +DeterministicRandomVariable::GetValue () { NS_LOG_FUNCTION (this); // Make sure the array has been set. @@ -1511,7 +1511,7 @@ DeterministicRandomVariable::GetValue (void) } uint32_t -DeterministicRandomVariable::GetInteger (void) +DeterministicRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return (uint32_t)GetValue (); @@ -1520,7 +1520,7 @@ DeterministicRandomVariable::GetInteger (void) NS_OBJECT_ENSURE_REGISTERED (EmpiricalRandomVariable); // ValueCDF methods -EmpiricalRandomVariable::ValueCDF::ValueCDF (void) +EmpiricalRandomVariable::ValueCDF::ValueCDF () : value (0.0), cdf (0.0) { @@ -1543,7 +1543,7 @@ operator < (EmpiricalRandomVariable::ValueCDF a, } TypeId -EmpiricalRandomVariable::GetTypeId (void) +EmpiricalRandomVariable::GetTypeId () { static TypeId tid = TypeId ("ns3::EmpiricalRandomVariable") .SetParent() @@ -1558,7 +1558,7 @@ EmpiricalRandomVariable::GetTypeId (void) ; return tid; } -EmpiricalRandomVariable::EmpiricalRandomVariable (void) +EmpiricalRandomVariable::EmpiricalRandomVariable () : m_validated (false) { NS_LOG_FUNCTION (this); @@ -1574,7 +1574,7 @@ EmpiricalRandomVariable::SetInterpolate (bool interpolate) } uint32_t -EmpiricalRandomVariable::GetInteger (void) +EmpiricalRandomVariable::GetInteger () { NS_LOG_FUNCTION (this); return static_cast (GetValue ()); @@ -1614,7 +1614,7 @@ EmpiricalRandomVariable::PreSample (double & value) } double -EmpiricalRandomVariable::GetValue (void) +EmpiricalRandomVariable::GetValue () { NS_LOG_FUNCTION (this); @@ -1648,7 +1648,7 @@ EmpiricalRandomVariable::DoSampleCDF (double r) } double -EmpiricalRandomVariable::Interpolate (void) +EmpiricalRandomVariable::Interpolate () { NS_LOG_FUNCTION (this); @@ -1700,7 +1700,7 @@ EmpiricalRandomVariable::CDF (double v, double c) } void -EmpiricalRandomVariable::Validate (void) +EmpiricalRandomVariable::Validate () { NS_LOG_FUNCTION (this); if (m_emp.empty ()) diff --git a/src/core/model/random-variable-stream.h b/src/core/model/random-variable-stream.h index 223ba0c2e..cf46722a2 100644 --- a/src/core/model/random-variable-stream.h +++ b/src/core/model/random-variable-stream.h @@ -101,7 +101,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Default constructor. */ @@ -127,7 +127,7 @@ public: * \return The stream number for the RngStream. * -1 means this stream was allocated automatically. */ - int64_t GetStream (void) const; + int64_t GetStream () const; /** * \brief Specify whether antithetic values should be generated. @@ -139,26 +139,26 @@ public: * \brief Check if antithetic values will be generated. * \return \c true if antithetic values will be generated. */ - bool IsAntithetic (void) const; + bool IsAntithetic () const; /** * \brief Get the next random value as a double drawn from the distribution. * \return A floating point random value. */ - virtual double GetValue (void) = 0; + virtual double GetValue () = 0; /** * \brief Get the next random value as an integer drawn from the distribution. * \return An integer random value. */ - virtual uint32_t GetInteger (void) = 0; + virtual uint32_t GetInteger () = 0; protected: /** * \brief Get the pointer to the underlying RngStream. * \return The underlying RngStream */ - RngStream * Peek (void) const; + RngStream * Peek () const; private: /** Pointer to the underlying RngStream. */ @@ -221,7 +221,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a uniform distribution RNG with the default range. @@ -232,13 +232,13 @@ public: * \brief Get the lower bound on randoms returned by GetValue(void). * \return The lower bound on values from GetValue(void). */ - double GetMin (void) const; + double GetMin () const; /** * \brief Get the upper bound on values returned by GetValue(void). * \return The upper bound on values from GetValue(void). */ - double GetMax (void) const; + double GetMax () const; /** * \brief Get the next random value, as a double in the specified range @@ -270,13 +270,13 @@ public: * \return A floating point random value. * \note The upper limit is excluded from the output range. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Get the next random value as an integer drawn from the distribution. * \return An integer random value. * \note The upper limit is included in the output range. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** The lower bound on values that can be returned by this RNG stream. */ @@ -305,7 +305,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a constant RNG with the default constant value. @@ -316,7 +316,7 @@ public: * \brief Get the constant value returned by this RNG stream. * \return The constant value. */ - double GetConstant (void) const; + double GetConstant () const; /** * \brief Get the next random value, as a double equal to the argument. @@ -333,9 +333,9 @@ public: // Inherited from RandomVariableStream /* \note This RNG always returns the same value. */ - virtual double GetValue (void); + virtual double GetValue (); /* \note This RNG always returns the same value. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** The constant value returned by this RNG stream. */ @@ -386,7 +386,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a sequential RNG with the default values @@ -398,31 +398,31 @@ public: * \brief Get the first value of the sequence. * \return The first value of the sequence. */ - double GetMin (void) const; + double GetMin () const; /** * \brief Get the limit of the sequence, which is (at least) * one more than the last value of the sequence. * \return The limit of the sequence. */ - double GetMax (void) const; + double GetMax () const; /** * \brief Get the increment for the sequence. * \return The increment between distinct values for the sequence. */ - Ptr GetIncrement (void) const; + Ptr GetIncrement () const; /** * \brief Get the number of times each distinct value of the sequence * is repeated before incrementing to the next value. * \return The number of times each value is repeated. */ - uint32_t GetConsecutive (void) const; + uint32_t GetConsecutive () const; // Inherited from RandomVariableStream - virtual double GetValue (void); - virtual uint32_t GetInteger (void); + virtual double GetValue (); + virtual uint32_t GetInteger (); private: /** The first value of the sequence. */ @@ -525,7 +525,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates an exponential distribution RNG with the default @@ -540,13 +540,13 @@ public: * truncated by a bound. * \return The configured mean value. */ - double GetMean (void) const; + double GetMean () const; /** * \brief Get the configured upper bound of this RNG. * \return The upper bound. */ - double GetBound (void) const; + double GetBound () const; /** * \brief Get the next random value, as a double from @@ -567,8 +567,8 @@ public: uint32_t GetInteger (uint32_t mean, uint32_t bound); // Inherited from RandomVariableStream - virtual double GetValue (void); - virtual uint32_t GetInteger (void); + virtual double GetValue (); + virtual uint32_t GetInteger (); private: /** The mean value of the unbounded exponential distribution. */ @@ -627,7 +627,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a Pareto distribution RNG with the default @@ -639,19 +639,19 @@ public: * \brief Returns the scale parameter for the Pareto distribution returned by this RNG stream. * \return The scale parameter for the Pareto distribution returned by this RNG stream. */ - double GetScale (void) const; + double GetScale () const; /** * \brief Returns the shape parameter for the Pareto distribution returned by this RNG stream. * \return The shape parameter for the Pareto distribution returned by this RNG stream. */ - double GetShape (void) const; + double GetShape () const; /** * \brief Returns the upper bound on values that can be returned by this RNG stream. * \return The upper bound on values that can be returned by this RNG stream. */ - double GetBound (void) const; + double GetBound () const; /** * \brief Returns a random double from a Pareto distribution with the specified scale, shape, and upper bound. @@ -741,7 +741,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns a random unsigned integer from a Pareto distribution with the current mean, shape, and upper bound. @@ -766,7 +766,7 @@ public: * * which now involves the distance \f$u\f$ is from 1 in the denominator. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** The scale parameter for the Pareto distribution returned by this RNG stream. */ @@ -841,7 +841,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a Weibull distribution RNG with the default @@ -853,19 +853,19 @@ public: * \brief Returns the scale parameter for the Weibull distribution returned by this RNG stream. * \return The scale parameter for the Weibull distribution returned by this RNG stream. */ - double GetScale (void) const; + double GetScale () const; /** * \brief Returns the shape parameter for the Weibull distribution returned by this RNG stream. * \return The shape parameter for the Weibull distribution returned by this RNG stream. */ - double GetShape (void) const; + double GetShape () const; /** * \brief Returns the upper bound on values that can be returned by this RNG stream. * \return The upper bound on values that can be returned by this RNG stream. */ - double GetBound (void) const; + double GetBound () const; /** * \brief Returns a random double from a Weibull distribution with the specified scale, shape, and upper bound. @@ -948,7 +948,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns a random unsigned integer from a Weibull distribution with the current scale, shape, and upper bound. @@ -972,7 +972,7 @@ public: * * which now involves the log of the distance \f$u\f$ is from 1. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** The scale parameter for the Weibull distribution returned by this RNG stream. */ @@ -1030,7 +1030,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a normal distribution RNG with the default @@ -1042,19 +1042,19 @@ public: * \brief Returns the mean value for the normal distribution returned by this RNG stream. * \return The mean value for the normal distribution returned by this RNG stream. */ - double GetMean (void) const; + double GetMean () const; /** * \brief Returns the variance value for the normal distribution returned by this RNG stream. * \return The variance value for the normal distribution returned by this RNG stream. */ - double GetVariance (void) const; + double GetVariance () const; /** * \brief Returns the bound on values that can be returned by this RNG stream. * \return The bound on values that can be returned by this RNG stream. */ - double GetBound (void) const; + double GetBound () const; /** * \brief Returns a random double from a normal distribution with the specified mean, variance, and bound. @@ -1170,7 +1170,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns a random unsigned integer from a normal distribution with the current mean, variance, and bound. @@ -1205,7 +1205,7 @@ public: * * which now involves the distances \f$u1\f$ and \f$u2\f$ are from 1. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** The mean value for the normal distribution returned by this RNG stream. */ @@ -1278,7 +1278,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a log-normal distribution RNG with the default @@ -1290,13 +1290,13 @@ public: * \brief Returns the mu value for the log-normal distribution returned by this RNG stream. * \return The mu value for the log-normal distribution returned by this RNG stream. */ - double GetMu (void) const; + double GetMu () const; /** * \brief Returns the sigma value for the log-normal distribution returned by this RNG stream. * \return The sigma value for the log-normal distribution returned by this RNG stream. */ - double GetSigma (void) const; + double GetSigma () const; /** * \brief Returns a random double from a log-normal distribution with the specified mu and sigma. @@ -1404,7 +1404,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns a random unsigned integer from a log-normal distribution with the current mu and sigma. @@ -1437,7 +1437,7 @@ public: * * which now involves the distances \f$u1\f$ and \f$u2\f$ are from 1. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** The mu value for the log-normal distribution returned by this RNG stream. */ @@ -1487,7 +1487,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a gamma distribution RNG with the default values @@ -1499,13 +1499,13 @@ public: * \brief Returns the alpha value for the gamma distribution returned by this RNG stream. * \return The alpha value for the gamma distribution returned by this RNG stream. */ - double GetAlpha (void) const; + double GetAlpha () const; /** * \brief Returns the beta value for the gamma distribution returned by this RNG stream. * \return The beta value for the gamma distribution returned by this RNG stream. */ - double GetBeta (void) const; + double GetBeta () const; /** * \brief Returns a random double from a gamma distribution with the specified alpha and beta. @@ -1553,7 +1553,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns a random unsigned integer from a gamma distribution with the current alpha and beta. @@ -1566,7 +1566,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** @@ -1666,7 +1666,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates an Erlang distribution RNG with the default values @@ -1678,13 +1678,13 @@ public: * \brief Returns the k value for the Erlang distribution returned by this RNG stream. * \return The k value for the Erlang distribution returned by this RNG stream. */ - uint32_t GetK (void) const; + uint32_t GetK () const; /** * \brief Returns the lambda value for the Erlang distribution returned by this RNG stream. * \return The lambda value for the Erlang distribution returned by this RNG stream. */ - double GetLambda (void) const; + double GetLambda () const; /** * \brief Returns a random double from an Erlang distribution with the specified k and lambda. @@ -1732,7 +1732,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns a random unsigned integer from an Erlang distribution with the current k and lambda. @@ -1745,7 +1745,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** @@ -1818,7 +1818,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a triangular distribution RNG with the default @@ -1830,19 +1830,19 @@ public: * \brief Returns the mean value for the triangular distribution returned by this RNG stream. * \return The mean value for the triangular distribution returned by this RNG stream. */ - double GetMean (void) const; + double GetMean () const; /** * \brief Returns the lower bound for the triangular distribution returned by this RNG stream. * \return The lower bound for the triangular distribution returned by this RNG stream. */ - double GetMin (void) const; + double GetMin () const; /** * \brief Returns the upper bound on values that can be returned by this RNG stream. * \return The upper bound on values that can be returned by this RNG stream. */ - double GetMax (void) const; + double GetMax () const; /** * \brief Returns a random double from a triangular distribution with the specified mean, min, and max. @@ -1964,7 +1964,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns a random unsigned integer from a triangular distribution with the current mean, min, and max. @@ -2001,7 +2001,7 @@ public: * * which now involves the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** The mean value for the triangular distribution returned by this RNG stream. */ @@ -2081,7 +2081,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a Zipf distribution RNG with the default values @@ -2093,13 +2093,13 @@ public: * \brief Returns the n value for the Zipf distribution returned by this RNG stream. * \return The n value for the Zipf distribution returned by this RNG stream. */ - uint32_t GetN (void) const; + uint32_t GetN () const; /** * \brief Returns the alpha value for the Zipf distribution returned by this RNG stream. * \return The alpha value for the Zipf distribution returned by this RNG stream. */ - double GetAlpha (void) const; + double GetAlpha () const; /** * \brief Returns a random double from a Zipf distribution with the specified n and alpha. @@ -2147,7 +2147,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns a random unsigned integer from a Zipf distribution with the current n and alpha. @@ -2160,7 +2160,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** The n value for the Zipf distribution returned by this RNG stream. */ @@ -2221,7 +2221,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a zeta distribution RNG with the default value for @@ -2233,7 +2233,7 @@ public: * \brief Returns the alpha value for the zeta distribution returned by this RNG stream. * \return The alpha value for the zeta distribution returned by this RNG stream. */ - double GetAlpha (void) const; + double GetAlpha () const; /** * \brief Returns a random double from a zeta distribution with the specified alpha. @@ -2279,7 +2279,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns a random unsigned integer from a zeta distribution with the current alpha. @@ -2292,7 +2292,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** The alpha value for the zeta distribution returned by this RNG stream. */ @@ -2341,7 +2341,7 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates a deterministic RNG that will have a predetermined @@ -2364,13 +2364,13 @@ public: * \brief Returns the next value in the sequence. * \return The floating point next value in the sequence. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns the next value in the sequence. * \return The integer next value in the sequence. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); private: /** Size of the array of values. */ @@ -2468,13 +2468,13 @@ public: * \brief Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \brief Creates an empirical RNG that has a specified, empirical * distribution, and configured for interpolating mode. */ - EmpiricalRandomVariable (void); + EmpiricalRandomVariable (); /** * \brief Specifies a point in the empirical distribution @@ -2499,7 +2499,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual double GetValue (void); + virtual double GetValue (); /** * \brief Returns the next value in the empirical distribution. @@ -2514,7 +2514,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (void); + virtual uint32_t GetInteger (); /** * \brief Returns the next value in the empirical distribution using @@ -2522,7 +2522,7 @@ public: * \return The floating point next value in the empirical distribution * using linear interpolation. */ - virtual double Interpolate (void); + virtual double Interpolate (); /** * \brief Switch the mode between sampling the CDF and interpolating. @@ -2538,7 +2538,7 @@ private: { public: /** \brief Constructor. */ - ValueCDF (void); + ValueCDF (); /** * \brief Construct from values. * @@ -2563,7 +2563,7 @@ private: * * It is a fatal error to fail validation. */ - void Validate (void); + void Validate (); /** * \brief Do the initial rng draw and check against the extrema. * diff --git a/src/core/model/realtime-simulator-impl.cc b/src/core/model/realtime-simulator-impl.cc index d724f48a6..77217d260 100644 --- a/src/core/model/realtime-simulator-impl.cc +++ b/src/core/model/realtime-simulator-impl.cc @@ -51,7 +51,7 @@ NS_LOG_COMPONENT_DEFINE ("RealtimeSimulatorImpl"); NS_OBJECT_ENSURE_REGISTERED (RealtimeSimulatorImpl); TypeId -RealtimeSimulatorImpl::GetTypeId (void) +RealtimeSimulatorImpl::GetTypeId () { static TypeId tid = TypeId ("ns3::RealtimeSimulatorImpl") .SetParent () @@ -99,7 +99,7 @@ RealtimeSimulatorImpl::~RealtimeSimulatorImpl () } void -RealtimeSimulatorImpl::DoDispose (void) +RealtimeSimulatorImpl::DoDispose () { NS_LOG_FUNCTION (this); while (!m_events->IsEmpty ()) @@ -160,7 +160,7 @@ RealtimeSimulatorImpl::SetScheduler (ObjectFactory schedulerFactory) } void -RealtimeSimulatorImpl::ProcessOneEvent (void) +RealtimeSimulatorImpl::ProcessOneEvent () { // // The idea here is to wait until the next event comes due. In the case of @@ -394,7 +394,7 @@ RealtimeSimulatorImpl::ProcessOneEvent (void) } bool -RealtimeSimulatorImpl::IsFinished (void) const +RealtimeSimulatorImpl::IsFinished () const { bool rc; { @@ -409,7 +409,7 @@ RealtimeSimulatorImpl::IsFinished (void) const // Peeks into event list. Should be called with critical section locked. // uint64_t -RealtimeSimulatorImpl::NextTs (void) const +RealtimeSimulatorImpl::NextTs () const { NS_ASSERT_MSG (m_events->IsEmpty () == false, "RealtimeSimulatorImpl::NextTs(): event queue is empty"); @@ -418,7 +418,7 @@ RealtimeSimulatorImpl::NextTs (void) const } void -RealtimeSimulatorImpl::Run (void) +RealtimeSimulatorImpl::Run () { NS_LOG_FUNCTION (this); @@ -480,19 +480,19 @@ RealtimeSimulatorImpl::Run (void) } bool -RealtimeSimulatorImpl::Running (void) const +RealtimeSimulatorImpl::Running () const { return m_running; } bool -RealtimeSimulatorImpl::Realtime (void) const +RealtimeSimulatorImpl::Realtime () const { return m_synchronizer->Realtime (); } void -RealtimeSimulatorImpl::Stop (void) +RealtimeSimulatorImpl::Stop () { NS_LOG_FUNCTION (this); m_stop = true; @@ -581,7 +581,7 @@ RealtimeSimulatorImpl::ScheduleNow (EventImpl *impl) } Time -RealtimeSimulatorImpl::Now (void) const +RealtimeSimulatorImpl::Now () const { return TimeStep (m_currentTs); } @@ -651,7 +651,7 @@ RealtimeSimulatorImpl::ScheduleRealtimeNow (EventImpl *impl) } Time -RealtimeSimulatorImpl::RealtimeNow (void) const +RealtimeSimulatorImpl::RealtimeNow () const { return TimeStep (m_synchronizer->GetCurrentRealtime ()); } @@ -786,26 +786,26 @@ RealtimeSimulatorImpl::IsExpired (const EventId &id) const } Time -RealtimeSimulatorImpl::GetMaximumSimulationTime (void) const +RealtimeSimulatorImpl::GetMaximumSimulationTime () const { return TimeStep (0x7fffffffffffffffLL); } // System ID for non-distributed simulation is always zero uint32_t -RealtimeSimulatorImpl::GetSystemId (void) const +RealtimeSimulatorImpl::GetSystemId () const { return 0; } uint32_t -RealtimeSimulatorImpl::GetContext (void) const +RealtimeSimulatorImpl::GetContext () const { return m_currentContext; } uint64_t -RealtimeSimulatorImpl::GetEventCount (void) const +RealtimeSimulatorImpl::GetEventCount () const { return m_eventCount; } @@ -818,7 +818,7 @@ RealtimeSimulatorImpl::SetSynchronizationMode (enum SynchronizationMode mode) } RealtimeSimulatorImpl::SynchronizationMode -RealtimeSimulatorImpl::GetSynchronizationMode (void) const +RealtimeSimulatorImpl::GetSynchronizationMode () const { NS_LOG_FUNCTION (this); return m_synchronizationMode; @@ -832,7 +832,7 @@ RealtimeSimulatorImpl::SetHardLimit (Time limit) } Time -RealtimeSimulatorImpl::GetHardLimit (void) const +RealtimeSimulatorImpl::GetHardLimit () const { NS_LOG_FUNCTION (this); return m_hardLimit; diff --git a/src/core/model/realtime-simulator-impl.h b/src/core/model/realtime-simulator-impl.h index 56e501103..0864bd205 100644 --- a/src/core/model/realtime-simulator-impl.h +++ b/src/core/model/realtime-simulator-impl.h @@ -60,7 +60,7 @@ public: * Get the registered TypeId for this class. * \returns The TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * What to do when we can't maintain real time synchrony. @@ -91,8 +91,8 @@ public: // Inherited from SimulatorImpl virtual void Destroy (); - virtual bool IsFinished (void) const; - virtual void Stop (void); + virtual bool IsFinished () const; + virtual void Stop (); virtual void Stop (const Time &delay); virtual EventId Schedule (const Time &delay, EventImpl *event); virtual void ScheduleWithContext (uint32_t context, const Time &delay, EventImpl *event); @@ -101,14 +101,14 @@ public: virtual void Remove (const EventId &ev); virtual void Cancel (const EventId &ev); virtual bool IsExpired (const EventId &ev) const; - virtual void Run (void); - virtual Time Now (void) const; + virtual void Run (); + virtual Time Now () const; virtual Time GetDelayLeft (const EventId &id) const; - virtual Time GetMaximumSimulationTime (void) const; + virtual Time GetMaximumSimulationTime () const; virtual void SetScheduler (ObjectFactory schedulerFactory); - virtual uint32_t GetSystemId (void) const; - virtual uint32_t GetContext (void) const; - virtual uint64_t GetEventCount (void) const; + virtual uint32_t GetSystemId () const; + virtual uint32_t GetContext () const; + virtual uint64_t GetEventCount () const; /** \copydoc ScheduleWithContext(uint32_t,const Time&,EventImpl*) */ void ScheduleRealtimeWithContext (uint32_t context, const Time &delay, EventImpl *event); @@ -136,7 +136,7 @@ public: * Get the current real time from the synchronizer. * \returns The current real time. */ - Time RealtimeNow (void) const; + Time RealtimeNow () const; /** * Set the SynchronizationMode. @@ -148,7 +148,7 @@ public: * Get the SynchronizationMode. * \returns The current SynchronizationMode. */ - RealtimeSimulatorImpl::SynchronizationMode GetSynchronizationMode (void) const; + RealtimeSimulatorImpl::SynchronizationMode GetSynchronizationMode () const; /** * Set the fatal error threshold for SynchronizationMode SYNC_HARD_LIMIT. @@ -163,28 +163,28 @@ public: * * \returns The hard limit threshold. */ - Time GetHardLimit (void) const; + Time GetHardLimit () const; private: /** * Is the simulator running? * \returns \c true if we are running. */ - bool Running (void) const; + bool Running () const; /** * Check that the Synchronizer is locked to the real time clock. * \return \c true if the Synchronizer is locked. */ - bool Realtime (void) const; + bool Realtime () const; /** * Get the timestep of the next event. * \returns The timestep of the next event. */ - uint64_t NextTs (void) const; + uint64_t NextTs () const; /** Process the next event. */ - void ProcessOneEvent (void); + void ProcessOneEvent (); /** Destructor implementation. */ - virtual void DoDispose (void); + virtual void DoDispose (); /** Container type for events to be run at destroy time. */ typedef std::list DestroyEvents; diff --git a/src/core/model/rng-seed-manager.cc b/src/core/model/rng-seed-manager.cc index aa48ab87a..a054a64c3 100644 --- a/src/core/model/rng-seed-manager.cc +++ b/src/core/model/rng-seed-manager.cc @@ -70,7 +70,7 @@ static ns3::GlobalValue g_rngRun ("RngRun", ns3::MakeUintegerChecker ()); -uint32_t RngSeedManager::GetSeed (void) +uint32_t RngSeedManager::GetSeed () { NS_LOG_FUNCTION_NOARGS (); UintegerValue seedValue; @@ -99,7 +99,7 @@ uint64_t RngSeedManager::GetRun () return run; } -uint64_t RngSeedManager::GetNextStreamIndex (void) +uint64_t RngSeedManager::GetNextStreamIndex () { NS_LOG_FUNCTION_NOARGS (); uint64_t next = g_nextStreamIndex; diff --git a/src/core/model/rng-seed-manager.h b/src/core/model/rng-seed-manager.h index 6b8f45f65..ebf1e8005 100644 --- a/src/core/model/rng-seed-manager.h +++ b/src/core/model/rng-seed-manager.h @@ -66,7 +66,7 @@ public: * * This returns the current seed value. */ - static uint32_t GetSeed (void); + static uint32_t GetSeed (); /** * \brief Set the run number of simulation. @@ -97,13 +97,13 @@ public: * \returns The current run number * \see SetRun */ - static uint64_t GetRun (void); + static uint64_t GetRun (); /** * Get the next automatically assigned stream index. * \returns The next stream index. */ - static uint64_t GetNextStreamIndex (void); + static uint64_t GetNextStreamIndex (); }; diff --git a/src/core/model/rng-stream.cc b/src/core/model/rng-stream.cc index a2054d94c..bbce131c3 100644 --- a/src/core/model/rng-stream.cc +++ b/src/core/model/rng-stream.cc @@ -292,7 +292,7 @@ struct Precalculated * * \returns The precalculated powers of the transition matrices. */ -struct Precalculated PowerOfTwoConstants (void) +struct Precalculated PowerOfTwoConstants () { struct Precalculated precalculated; for (int i = 0; i < 190; i++) diff --git a/src/core/model/rng-stream.h b/src/core/model/rng-stream.h index 2ee627e4c..2ac413f2f 100644 --- a/src/core/model/rng-stream.h +++ b/src/core/model/rng-stream.h @@ -69,7 +69,7 @@ public: * * \returns The next random. */ - double RandU01 (void); + double RandU01 (); private: /** diff --git a/src/core/model/scheduler.cc b/src/core/model/scheduler.cc index 2d41cbdc4..9d9797f41 100644 --- a/src/core/model/scheduler.cc +++ b/src/core/model/scheduler.cc @@ -40,7 +40,7 @@ Scheduler::~Scheduler () } TypeId -Scheduler::GetTypeId (void) +Scheduler::GetTypeId () { static TypeId tid = TypeId ("ns3::Scheduler") .SetParent () diff --git a/src/core/model/scheduler.h b/src/core/model/scheduler.h index 2289e7456..d6ce02758 100644 --- a/src/core/model/scheduler.h +++ b/src/core/model/scheduler.h @@ -159,7 +159,7 @@ public: * Register this type. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * \ingroup events @@ -198,7 +198,7 @@ public: * * \returns \c true if the event list is empty and \c false otherwise. */ - virtual bool IsEmpty (void) const = 0; + virtual bool IsEmpty () const = 0; /** * Get a pointer to the next event. * @@ -207,7 +207,7 @@ public: * \returns A pointer to the next earliest event. The caller * takes ownership of the returned pointer. */ - virtual Event PeekNext (void) const = 0; + virtual Event PeekNext () const = 0; /** * Remove the earliest event from the event list. * @@ -215,7 +215,7 @@ public: * * \return The Event. */ - virtual Event RemoveNext (void) = 0; + virtual Event RemoveNext () = 0; /** * Remove a specific event from the event list. * diff --git a/src/core/model/show-progress.cc b/src/core/model/show-progress.cc index 410b05ec2..1b9498de9 100644 --- a/src/core/model/show-progress.cc +++ b/src/core/model/show-progress.cc @@ -63,7 +63,7 @@ ShowProgress::ShowProgress (const Time interval /* = Seconds (1.0) */, } -ShowProgress::~ShowProgress (void) +ShowProgress::~ShowProgress () { Stop (); } @@ -107,7 +107,7 @@ ShowProgress::SetStream (std::ostream & os) } void -ShowProgress::ScheduleCheckProgress (void) +ShowProgress::ScheduleCheckProgress () { NS_LOG_FUNCTION (this); m_event = Simulator::Schedule (m_vtime, &ShowProgress::CheckProgress, this); @@ -153,7 +153,7 @@ ShowProgress::GiveFeedback (uint64_t nEvents, int64x64_t ratio, int64x64_t speed } // ShowProgress::GiveFeedback void -ShowProgress::CheckProgress (void) +ShowProgress::CheckProgress () { // Get elapsed wall clock time m_elapsed += MilliSeconds (m_timer.End ()); @@ -277,7 +277,7 @@ ShowProgress::CheckProgress (void) } // ShowProgress::CheckProgress void -ShowProgress::Start (void) +ShowProgress::Start () { m_stamp.Stamp (); (*m_os) << "Start wall clock: " << m_stamp.ToString () @@ -285,7 +285,7 @@ ShowProgress::Start (void) } // ShowProgress::Start void -ShowProgress::Stop (void) +ShowProgress::Stop () { m_stamp.Stamp (); (*m_os) << "End wall clock: " << m_stamp.ToString () diff --git a/src/core/model/show-progress.h b/src/core/model/show-progress.h index 8327002d0..75e3d820b 100644 --- a/src/core/model/show-progress.h +++ b/src/core/model/show-progress.h @@ -104,7 +104,7 @@ public: std::ostream & os = std::cout); /** Destructor. */ - ~ShowProgress (void); + ~ShowProgress (); /** * Set the target update interval, in wallclock time. @@ -141,18 +141,18 @@ private: * Start the elapsed wallclock timestamp and print the start time. * This is triggered by the constructor. */ - void Start (void); + void Start (); /** * Stop the elapsed wallclock timestamp and print the total elapsed time. * This is triggered by the destructor. */ - void Stop (void); + void Stop (); /** * Schedule the next CheckProgress. */ - void ScheduleCheckProgress (void); + void ScheduleCheckProgress (); /** * Check on execution progress. @@ -160,7 +160,7 @@ private: * state on rate of progress, and decides if it's time to generate * output. */ - void CheckProgress (void); + void CheckProgress (); /** * Show execution progress. diff --git a/src/core/model/simple-ref-count.h b/src/core/model/simple-ref-count.h index 3c0bfb926..aa4956597 100644 --- a/src/core/model/simple-ref-count.h +++ b/src/core/model/simple-ref-count.h @@ -107,7 +107,7 @@ public: * conjunction with the Ptr template which would make calling Ref * unnecessary and dangerous. */ - inline void Ref (void) const + inline void Ref () const { NS_ASSERT (m_count < std::numeric_limits::max ()); m_count++; @@ -118,7 +118,7 @@ public: * conjunction with the Ptr template which would make calling Ref * unnecessary and dangerous. */ - inline void Unref (void) const + inline void Unref () const { m_count--; if (m_count == 0) @@ -133,7 +133,7 @@ public: * * \return The reference count. */ - inline uint32_t GetReferenceCount (void) const + inline uint32_t GetReferenceCount () const { return m_count; } diff --git a/src/core/model/simulation-singleton.h b/src/core/model/simulation-singleton.h index 2611ecb03..3a5d8e060 100644 --- a/src/core/model/simulation-singleton.h +++ b/src/core/model/simulation-singleton.h @@ -56,7 +56,7 @@ public: * * \returns A pointer to the singleton instance. */ - static T * Get (void); + static T * Get (); private: @@ -69,10 +69,10 @@ private: * * \returns The address of the pointer holding the static instance. */ - static T ** GetObject (void); + static T ** GetObject (); /** Delete the static instance. */ - static void DeleteObject (void); + static void DeleteObject (); }; } // namespace ns3 @@ -88,7 +88,7 @@ namespace ns3 { template T * -SimulationSingleton::Get (void) +SimulationSingleton::Get () { T ** ppobject = GetObject (); return *ppobject; @@ -96,7 +96,7 @@ SimulationSingleton::Get (void) template T ** -SimulationSingleton::GetObject (void) +SimulationSingleton::GetObject () { static T *pobject = 0; if (pobject == 0) @@ -109,7 +109,7 @@ SimulationSingleton::GetObject (void) template void -SimulationSingleton::DeleteObject (void) +SimulationSingleton::DeleteObject () { T **ppobject = GetObject (); delete (*ppobject); diff --git a/src/core/model/simulator-impl.cc b/src/core/model/simulator-impl.cc index d1a5a919a..6ccc266a2 100644 --- a/src/core/model/simulator-impl.cc +++ b/src/core/model/simulator-impl.cc @@ -33,7 +33,7 @@ NS_LOG_COMPONENT_DEFINE ("SimulatorImpl"); NS_OBJECT_ENSURE_REGISTERED (SimulatorImpl); TypeId -SimulatorImpl::GetTypeId (void) +SimulatorImpl::GetTypeId () { static TypeId tid = TypeId ("ns3::SimulatorImpl") .SetParent () diff --git a/src/core/model/simulator-impl.h b/src/core/model/simulator-impl.h index 2edea970c..1f58484d8 100644 --- a/src/core/model/simulator-impl.h +++ b/src/core/model/simulator-impl.h @@ -53,14 +53,14 @@ public: * Get the registered TypeId for this class. * \return The object TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** \copydoc Simulator::Destroy */ virtual void Destroy () = 0; /** \copydoc Simulator::IsFinished */ - virtual bool IsFinished (void) const = 0; + virtual bool IsFinished () const = 0; /** \copydoc Simulator::Stop(void) */ - virtual void Stop (void) = 0; + virtual void Stop () = 0; /** \copydoc Simulator::Stop(const Time&) */ virtual void Stop (const Time &delay) = 0; /** \copydoc Simulator::Schedule(const Time&,const Ptr&) */ @@ -78,13 +78,13 @@ public: /** \copydoc Simulator::IsExpired */ virtual bool IsExpired (const EventId &id) const = 0; /** \copydoc Simulator::Run */ - virtual void Run (void) = 0; + virtual void Run () = 0; /** \copydoc Simulator::Now */ - virtual Time Now (void) const = 0; + virtual Time Now () const = 0; /** \copydoc Simulator::GetDelayLeft */ virtual Time GetDelayLeft (const EventId &id) const = 0; /** \copydoc Simulator::GetMaximumSimulationTime */ - virtual Time GetMaximumSimulationTime (void) const = 0; + virtual Time GetMaximumSimulationTime () const = 0; /** * Set the Scheduler to be used to manage the event list. * @@ -98,9 +98,9 @@ public: /** \copydoc Simulator::GetSystemId */ virtual uint32_t GetSystemId () const = 0; /** \copydoc Simulator::GetContext */ - virtual uint32_t GetContext (void) const = 0; + virtual uint32_t GetContext () const = 0; /** \copydoc Simulator::GetEventCount */ - virtual uint64_t GetEventCount (void) const = 0; + virtual uint64_t GetEventCount () const = 0; /** * Hook called before processing each event. diff --git a/src/core/model/simulator.cc b/src/core/model/simulator.cc index fd798176d..b438ff130 100644 --- a/src/core/model/simulator.cc +++ b/src/core/model/simulator.cc @@ -83,7 +83,7 @@ static GlobalValue g_schedTypeImpl = GlobalValue ("SchedulerType", * \brief Get the static SimulatorImpl instance. * \return The SimulatorImpl instance pointer. */ -static SimulatorImpl ** PeekImpl (void) +static SimulatorImpl ** PeekImpl () { static SimulatorImpl *impl = 0; return &impl; @@ -95,7 +95,7 @@ static SimulatorImpl ** PeekImpl (void) * \return The singleton pointer. * \see Simulator::GetImplementation() */ -static SimulatorImpl * GetImpl (void) +static SimulatorImpl * GetImpl () { SimulatorImpl **pimpl = PeekImpl (); /* Please, don't include any calls to logging macros in this function @@ -133,7 +133,7 @@ static SimulatorImpl * GetImpl (void) } void -Simulator::Destroy (void) +Simulator::Destroy () { NS_LOG_FUNCTION_NOARGS (); @@ -162,14 +162,14 @@ Simulator::SetScheduler (ObjectFactory schedulerFactory) } bool -Simulator::IsFinished (void) +Simulator::IsFinished () { NS_LOG_FUNCTION_NOARGS (); return GetImpl ()->IsFinished (); } void -Simulator::Run (void) +Simulator::Run () { NS_LOG_FUNCTION_NOARGS (); Time::ClearMarkedTimes (); @@ -177,7 +177,7 @@ Simulator::Run (void) } void -Simulator::Stop (void) +Simulator::Stop () { NS_LOG_FUNCTION_NOARGS (); NS_LOG_LOGIC ("stop"); @@ -192,7 +192,7 @@ Simulator::Stop (Time const &delay) } Time -Simulator::Now (void) +Simulator::Now () { /* Please, don't include any calls to logging macros in this function * or pay the price, that is, stack explosions. @@ -284,32 +284,32 @@ Simulator::IsExpired (const EventId &id) return GetImpl ()->IsExpired (id); } -Time Now (void) +Time Now () { return Simulator::Now (); } Time -Simulator::GetMaximumSimulationTime (void) +Simulator::GetMaximumSimulationTime () { NS_LOG_FUNCTION_NOARGS (); return GetImpl ()->GetMaximumSimulationTime (); } uint32_t -Simulator::GetContext (void) +Simulator::GetContext () { return GetImpl ()->GetContext (); } uint64_t -Simulator::GetEventCount (void) +Simulator::GetEventCount () { return GetImpl ()->GetEventCount (); } uint32_t -Simulator::GetSystemId (void) +Simulator::GetSystemId () { NS_LOG_FUNCTION_NOARGS (); @@ -350,7 +350,7 @@ Simulator::SetImplementation (Ptr impl) } Ptr -Simulator::GetImplementation (void) +Simulator::GetImplementation () { NS_LOG_FUNCTION_NOARGS (); return GetImpl (); diff --git a/src/core/model/simulator.h b/src/core/model/simulator.h index fd704cd79..c5d3bf076 100644 --- a/src/core/model/simulator.h +++ b/src/core/model/simulator.h @@ -103,7 +103,7 @@ public: * @return The SimulatorImpl singleton. */ - static Ptr GetImplementation (void); + static Ptr GetImplementation (); /** * @brief Set the scheduler type with an ObjectFactory. @@ -124,7 +124,7 @@ public: * to restart a new simulation with a set of calls to Simulator::Run, * Simulator::Schedule and Simulator::ScheduleWithContext. */ - static void Destroy (void); + static void Destroy (); /** * Check if the simulation should finish. @@ -135,7 +135,7 @@ public: * * @return @c true if no more events or stop time reached. */ - static bool IsFinished (void); + static bool IsFinished (); /** * Run the simulation. @@ -147,7 +147,7 @@ public: * expiration time of the next event to be processed * is greater than or equal to the stop time. */ - static void Run (void); + static void Run (); /** * Tell the Simulator the calling event should be the last one @@ -157,7 +157,7 @@ public: * event executed by the Simulator::Run method before * returning to the caller. */ - static void Stop (void); + static void Stop (); /** * Schedule the time delay until the Simulator should stop. @@ -186,7 +186,7 @@ public: * * @return The current simulation context */ - static uint32_t GetContext (void); + static uint32_t GetContext (); /** * Context enum values. @@ -207,7 +207,7 @@ public: * Get the number of events executed. * \returns The total number of events executed. */ - static uint64_t GetEventCount (void); + static uint64_t GetEventCount (); /** @@ -430,7 +430,7 @@ public: * * @returns The current virtual time. */ - static Time Now (void); + static Time Now (); /** * Get the remaining time until this event will execute. @@ -450,7 +450,7 @@ public: * * The returned value will always be bigger than or equal to Simulator::Now. */ - static Time GetMaximumSimulationTime (void); + static Time GetMaximumSimulationTime (); /** * Schedule a future event execution (in the same context). @@ -495,7 +495,7 @@ public: * in a distributed simulation. For MPI this is the MPI rank. * @return The system id for this simulator. */ - static uint32_t GetSystemId (void); + static uint32_t GetSystemId (); private: /** @@ -533,7 +533,7 @@ private: * @endcode * @return The current simulation time. */ -Time Now (void); +Time Now (); } // namespace ns3 diff --git a/src/core/model/singleton.h b/src/core/model/singleton.h index 67c80ec6f..1492da634 100644 --- a/src/core/model/singleton.h +++ b/src/core/model/singleton.h @@ -72,7 +72,7 @@ public: * * \return A pointer to the singleton instance. */ - static T * Get (void); + static T * Get (); protected: /** Constructor. */ @@ -97,7 +97,7 @@ namespace ns3 { template T * -Singleton::Get (void) +Singleton::Get () { static T object; return &object; diff --git a/src/core/model/synchronizer.cc b/src/core/model/synchronizer.cc index b84219794..229f626b2 100644 --- a/src/core/model/synchronizer.cc +++ b/src/core/model/synchronizer.cc @@ -32,7 +32,7 @@ NS_LOG_COMPONENT_DEFINE ("Synchronizer"); NS_OBJECT_ENSURE_REGISTERED (Synchronizer); TypeId -Synchronizer::GetTypeId (void) +Synchronizer::GetTypeId () { static TypeId tid = TypeId ("ns3::Synchronizer") .SetParent () @@ -54,14 +54,14 @@ Synchronizer::~Synchronizer () } bool -Synchronizer::Realtime (void) +Synchronizer::Realtime () { NS_LOG_FUNCTION (this); return DoRealtime (); } uint64_t -Synchronizer::GetCurrentRealtime (void) +Synchronizer::GetCurrentRealtime () { NS_LOG_FUNCTION (this); return NanosecondToTimeStep (DoGetCurrentRealtime ()); @@ -76,7 +76,7 @@ Synchronizer::SetOrigin (uint64_t ts) } uint64_t -Synchronizer::GetOrigin (void) +Synchronizer::GetOrigin () { NS_LOG_FUNCTION (this); return NanosecondToTimeStep (m_simOriginNano); @@ -107,7 +107,7 @@ Synchronizer::Synchronize (uint64_t tsCurrent, uint64_t tsDelay) } void -Synchronizer::Signal (void) +Synchronizer::Signal () { NS_LOG_FUNCTION (this); DoSignal (); @@ -121,14 +121,14 @@ Synchronizer::SetCondition (bool cond) } void -Synchronizer::EventStart (void) +Synchronizer::EventStart () { NS_LOG_FUNCTION (this); DoEventStart (); } uint64_t -Synchronizer::EventEnd (void) +Synchronizer::EventEnd () { NS_LOG_FUNCTION (this); return NanosecondToTimeStep (DoEventEnd ()); diff --git a/src/core/model/synchronizer.h b/src/core/model/synchronizer.h index 04bca0ca1..6c04ae86e 100644 --- a/src/core/model/synchronizer.h +++ b/src/core/model/synchronizer.h @@ -55,7 +55,7 @@ public: * Get the registered TypeId for this class. * @returns The TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ Synchronizer (); @@ -70,7 +70,7 @@ public: * * @returns @c true if locked with realtime, @c false if not. */ - bool Realtime (void); + bool Realtime (); /** * @brief Retrieve the value of the origin of the underlying normalized wall @@ -79,7 +79,7 @@ public: * @returns The normalized wall clock time (in Time resolution units). * @see SetOrigin */ - uint64_t GetCurrentRealtime (void); + uint64_t GetCurrentRealtime (); /** * @brief Establish a correspondence between a simulation time and the @@ -108,7 +108,7 @@ public: * @returns The simulation time used as the origin (in Time resolution units). * @see SetOrigin */ - uint64_t GetOrigin (void); + uint64_t GetOrigin (); /** * @brief Retrieve the difference between the real time clock used to @@ -158,7 +158,7 @@ public: * @see Synchronize * @see DoSignal */ - void Signal (void); + void Signal (); /** * @brief Set the condition variable that tells a possible simulator thread @@ -179,7 +179,7 @@ public: * * @see EventEnd */ - void EventStart (void); + void EventStart (); /** * @brief Ask the synchronizer to return the time step between the instant @@ -191,7 +191,7 @@ public: * @returns The elapsed real time, in ns. * @see EventStart */ - uint64_t EventEnd (void); + uint64_t EventEnd (); protected: /** @@ -231,7 +231,7 @@ protected: * * @returns @c true if locked with realtime, @c false if not. */ - virtual bool DoRealtime (void) = 0; + virtual bool DoRealtime () = 0; /** * @brief Retrieve the value of the origin of the underlying normalized wall @@ -243,7 +243,7 @@ protected: * @returns The normalized wall clock time (in nanosecond units). * @see SetOrigin */ - virtual uint64_t DoGetCurrentRealtime (void) = 0; + virtual uint64_t DoGetCurrentRealtime () = 0; /** * @brief Wait until the real time is in sync with the specified simulation @@ -277,7 +277,7 @@ protected: * * @see Signal */ - virtual void DoSignal (void) = 0; + virtual void DoSignal () = 0; /** * @brief Set the condition variable to tell a possible simulator thread @@ -304,14 +304,14 @@ protected: * @brief Record the normalized real time at which the current * event is starting execution. */ - virtual void DoEventStart (void) = 0; + virtual void DoEventStart () = 0; /** * @brief Return the amount of real time elapsed since the last call * to EventStart. * * @returns The elapsed real time, in ns. */ - virtual uint64_t DoEventEnd (void) = 0; + virtual uint64_t DoEventEnd () = 0; /** The real time, in ns, when SetOrigin was called. */ uint64_t m_realtimeOriginNano; diff --git a/src/core/model/system-path.cc b/src/core/model/system-path.cc index ea4ac42ee..506c438f0 100644 --- a/src/core/model/system-path.cc +++ b/src/core/model/system-path.cc @@ -138,7 +138,7 @@ Dirname (std::string path) } std::string -FindSelfDirectory (void) +FindSelfDirectory () { /** * This function returns the path to the running $PREFIX. @@ -304,7 +304,7 @@ ReadFiles (std::string path) } std::string -MakeTemporaryDirectoryName (void) +MakeTemporaryDirectoryName () { NS_LOG_FUNCTION_NOARGS (); char *path = NULL; diff --git a/src/core/model/system-path.h b/src/core/model/system-path.h index 2476e1b31..24572287f 100644 --- a/src/core/model/system-path.h +++ b/src/core/model/system-path.h @@ -56,7 +56,7 @@ namespace SystemPath { * * \return The directory in which the currently-executing binary is located */ -std::string FindSelfDirectory (void); +std::string FindSelfDirectory (); /** * \ingroup systempath @@ -131,7 +131,7 @@ std::list ReadFiles (std::string path); * * \return A path which identifies a temporary directory. */ -std::string MakeTemporaryDirectoryName (void); +std::string MakeTemporaryDirectoryName (); /** * \ingroup systempath diff --git a/src/core/model/system-wall-clock-ms.cc b/src/core/model/system-wall-clock-ms.cc index 976b0a121..6647c4a20 100644 --- a/src/core/model/system-wall-clock-ms.cc +++ b/src/core/model/system-wall-clock-ms.cc @@ -41,15 +41,15 @@ class SystemWallClockMsPrivate { public: /** \copydoc SystemWallClockMs::Start() */ - void Start (void); + void Start (); /** \copydoc SystemWallClockMs::End() */ - int64_t End (void); + int64_t End (); /** \copydoc SystemWallClockMs::GetElapsedReal() */ - int64_t GetElapsedReal (void) const; + int64_t GetElapsedReal () const; /** \copydoc SystemWallClockMs::GetElapsedUser() */ - int64_t GetElapsedUser (void) const; + int64_t GetElapsedUser () const; /** \copydoc SystemWallClockMs::GetElapsedSystem() */ - int64_t GetElapsedSystem (void) const; + int64_t GetElapsedSystem () const; private: std::chrono::system_clock::time_point m_startTime; //!< The wall clock start time. @@ -59,14 +59,14 @@ private: }; void -SystemWallClockMsPrivate::Start (void) +SystemWallClockMsPrivate::Start () { NS_LOG_FUNCTION (this); m_startTime = std::chrono::system_clock::now (); } int64_t -SystemWallClockMsPrivate::End (void) +SystemWallClockMsPrivate::End () { // // We need to return the number of milliseconds that have elapsed in some @@ -111,21 +111,21 @@ SystemWallClockMsPrivate::End (void) } int64_t -SystemWallClockMsPrivate::GetElapsedReal (void) const +SystemWallClockMsPrivate::GetElapsedReal () const { NS_LOG_FUNCTION (this); return m_elapsedReal; } int64_t -SystemWallClockMsPrivate::GetElapsedUser (void) const +SystemWallClockMsPrivate::GetElapsedUser () const { NS_LOG_FUNCTION (this); return m_elapsedUser; } int64_t -SystemWallClockMsPrivate::GetElapsedSystem (void) const +SystemWallClockMsPrivate::GetElapsedSystem () const { NS_LOG_FUNCTION (this); return m_elapsedSystem; @@ -145,35 +145,35 @@ SystemWallClockMs::~SystemWallClockMs () } void -SystemWallClockMs::Start (void) +SystemWallClockMs::Start () { NS_LOG_FUNCTION (this); m_priv->Start (); } int64_t -SystemWallClockMs::End (void) +SystemWallClockMs::End () { NS_LOG_FUNCTION (this); return m_priv->End (); } int64_t -SystemWallClockMs::GetElapsedReal (void) const +SystemWallClockMs::GetElapsedReal () const { NS_LOG_FUNCTION (this); return m_priv->GetElapsedReal (); } int64_t -SystemWallClockMs::GetElapsedUser (void) const +SystemWallClockMs::GetElapsedUser () const { NS_LOG_FUNCTION (this); return m_priv->GetElapsedUser (); } int64_t -SystemWallClockMs::GetElapsedSystem (void) const +SystemWallClockMs::GetElapsedSystem () const { NS_LOG_FUNCTION (this); return m_priv->GetElapsedSystem (); diff --git a/src/core/model/system-wall-clock-ms.h b/src/core/model/system-wall-clock-ms.h index a0a39c78c..e78b50f47 100644 --- a/src/core/model/system-wall-clock-ms.h +++ b/src/core/model/system-wall-clock-ms.h @@ -59,7 +59,7 @@ public: /** * Start a measure. */ - void Start (void); + void Start (); /** * \brief Stop measuring the time since Start() was called. * \returns the measured elapsed wall clock time (in milliseconds) since @@ -70,7 +70,7 @@ public: * * Returns \c int64_t to avoid dependency on \c clock_t in ns-3 code. */ - int64_t End (void); + int64_t End (); /** * \returns the measured elapsed wall clock time (in milliseconds) since @@ -78,21 +78,21 @@ public: * * Returns \c int64_t to avoid dependency on \c clock_t in ns-3 code. */ - int64_t GetElapsedReal (void) const; + int64_t GetElapsedReal () const; /** * \returns the measured elapsed 'user' wall clock time (in milliseconds) * since Start() was invoked. * * Returns \c int64_t to avoid dependency on \c clock_t in ns-3 code. */ - int64_t GetElapsedUser (void) const; + int64_t GetElapsedUser () const; /** * \returns the measured elapsed 'system' wall clock time (in milliseconds) * since Start() was invoked. * * Returns \c int64_t to avoid dependency on \c clock_t in ns-3 code. */ - int64_t GetElapsedSystem (void) const; + int64_t GetElapsedSystem () const; private: class SystemWallClockMsPrivate *m_priv; //!< The implementation. diff --git a/src/core/model/system-wall-clock-timestamp.cc b/src/core/model/system-wall-clock-timestamp.cc index 43c96a234..b1454c050 100644 --- a/src/core/model/system-wall-clock-timestamp.cc +++ b/src/core/model/system-wall-clock-timestamp.cc @@ -28,7 +28,7 @@ namespace ns3 { -SystemWallClockTimestamp::SystemWallClockTimestamp (void) +SystemWallClockTimestamp::SystemWallClockTimestamp () : m_last (0), m_diff (0) { @@ -36,7 +36,7 @@ SystemWallClockTimestamp::SystemWallClockTimestamp (void) } void -SystemWallClockTimestamp::Stamp (void) +SystemWallClockTimestamp::Stamp () { std::time_t seconds = std::time (NULL); m_diff = seconds - m_last; @@ -44,7 +44,7 @@ SystemWallClockTimestamp::Stamp (void) } std::string -SystemWallClockTimestamp::ToString (void) const +SystemWallClockTimestamp::ToString () const { std::string now = std::ctime ( &m_last ); now.resize (now.length () - 1); // trim trailing newline @@ -52,13 +52,13 @@ SystemWallClockTimestamp::ToString (void) const } std::time_t -SystemWallClockTimestamp::GetLast (void) const +SystemWallClockTimestamp::GetLast () const { return m_last; } std::time_t -SystemWallClockTimestamp::GetInterval (void) const +SystemWallClockTimestamp::GetInterval () const { return m_diff; } diff --git a/src/core/model/system-wall-clock-timestamp.h b/src/core/model/system-wall-clock-timestamp.h index d5a576e7e..4ca925ba2 100644 --- a/src/core/model/system-wall-clock-timestamp.h +++ b/src/core/model/system-wall-clock-timestamp.h @@ -40,28 +40,28 @@ class SystemWallClockTimestamp { public: /** Constructor */ - SystemWallClockTimestamp (void); + SystemWallClockTimestamp (); /** Record the current wall-clock time and delta since the last stamp(). */ - void Stamp (void); + void Stamp (); /** * Get the last time stamp as a string. * \return The last time stamp. */ - std::string ToString (void) const; + std::string ToString () const; /** * Get the last recorded raw value. * \returns The last time stamp recorded. */ - std::time_t GetLast (void) const; + std::time_t GetLast () const; /** * Get the last recorded interval. * \returns The interval between the last two time stamps. */ - std::time_t GetInterval (void) const; + std::time_t GetInterval () const; private: diff --git a/src/core/model/test.cc b/src/core/model/test.cc index 677a659ea..a41d96eb8 100644 --- a/src/core/model/test.cc +++ b/src/core/model/test.cc @@ -147,14 +147,14 @@ public: */ void AddTestSuite (TestSuite *testSuite); /** \copydoc TestCase::MustAssertOnFailure() */ - bool MustAssertOnFailure (void) const; + bool MustAssertOnFailure () const; /** \copydoc TestCase::MustContinueOnFailure() */ - bool MustContinueOnFailure (void) const; + bool MustContinueOnFailure () const; /** * Check if this run should update the reference data. * \return \c true if we should update the reference data. */ - bool MustUpdateData (void) const; + bool MustUpdateData () const; /** * Get the path to the root of the source tree. * @@ -163,12 +163,12 @@ public: * * \returns The path to the root. */ - std::string GetTopLevelSourceDir (void) const; + std::string GetTopLevelSourceDir () const; /** * Get the path to temporary directory. * \return The temporary directory path. */ - std::string GetTempDir (void) const; + std::string GetTempDir () const; /** \copydoc TestRunner::Run() */ int Run (int argc, char *argv[]); @@ -220,7 +220,7 @@ private: std::list::const_iterator end, bool printTestType) const; /** Print the list of test types. */ - void PrintTestTypeList (void) const; + void PrintTestTypeList () const; /** * Print the help text. * \param [in] programName The name of the invoking program. @@ -337,7 +337,7 @@ TestCase::AddTestCase (TestCase *testCase, enum TestCase::TestDuration duration) } bool -TestCase::IsFailed (void) const +TestCase::IsFailed () const { NS_LOG_FUNCTION (this); return m_result->childrenFailed || !m_result->failure.empty (); @@ -367,7 +367,7 @@ out: m_runner = 0; } std::string -TestCase::GetName (void) const +TestCase::GetName () const { NS_LOG_FUNCTION (this); return m_name; @@ -396,13 +396,13 @@ TestCase::ReportTestFailure (std::string cond, std::string actual, } bool -TestCase::MustAssertOnFailure (void) const +TestCase::MustAssertOnFailure () const { NS_LOG_FUNCTION (this); return m_runner->MustAssertOnFailure (); } bool -TestCase::MustContinueOnFailure (void) const +TestCase::MustContinueOnFailure () const { NS_LOG_FUNCTION (this); return m_runner->MustContinueOnFailure (); @@ -451,13 +451,13 @@ TestCase::CreateTempDirFilename (std::string filename) } } bool -TestCase::IsStatusFailure (void) const +TestCase::IsStatusFailure () const { NS_LOG_FUNCTION (this); return !IsStatusSuccess (); } bool -TestCase::IsStatusSuccess (void) const +TestCase::IsStatusSuccess () const { NS_LOG_FUNCTION (this); return m_result->failure.empty (); @@ -471,12 +471,12 @@ TestCase::SetDataDir (std::string directory) } void -TestCase::DoSetup (void) +TestCase::DoSetup () { NS_LOG_FUNCTION (this); } void -TestCase::DoTeardown (void) +TestCase::DoTeardown () { NS_LOG_FUNCTION (this); } @@ -491,14 +491,14 @@ TestSuite::TestSuite (std::string name, TestSuite::Type type) } TestSuite::Type -TestSuite::GetTestType (void) +TestSuite::GetTestType () { NS_LOG_FUNCTION (this); return m_type; } void -TestSuite::DoRun (void) +TestSuite::DoRun () { NS_LOG_FUNCTION (this); } @@ -521,26 +521,26 @@ TestRunnerImpl::AddTestSuite (TestSuite *testSuite) bool -TestRunnerImpl::MustAssertOnFailure (void) const +TestRunnerImpl::MustAssertOnFailure () const { NS_LOG_FUNCTION (this); return m_assertOnFailure; } bool -TestRunnerImpl::MustContinueOnFailure (void) const +TestRunnerImpl::MustContinueOnFailure () const { NS_LOG_FUNCTION (this); return m_continueOnFailure; } bool -TestRunnerImpl::MustUpdateData (void) const +TestRunnerImpl::MustUpdateData () const { NS_LOG_FUNCTION (this); return m_updateData; } std::string -TestRunnerImpl::GetTempDir (void) const +TestRunnerImpl::GetTempDir () const { NS_LOG_FUNCTION (this); return m_tempDir; @@ -574,7 +574,7 @@ TestRunnerImpl::IsTopLevelSourceDir (std::string path) const } std::string -TestRunnerImpl::GetTopLevelSourceDir (void) const +TestRunnerImpl::GetTopLevelSourceDir () const { NS_LOG_FUNCTION (this); std::string self = SystemPath::FindSelfDirectory (); @@ -798,7 +798,7 @@ TestRunnerImpl::PrintTestNameList (std::list::const_iterator begin, } void -TestRunnerImpl::PrintTestTypeList (void) const +TestRunnerImpl::PrintTestTypeList () const { NS_LOG_FUNCTION (this); std::cout << " core: Run all TestSuite-based tests (exclude examples)" << std::endl; diff --git a/src/core/model/test.h b/src/core/model/test.h index 836f7c2b3..872eb07d9 100644 --- a/src/core/model/test.h +++ b/src/core/model/test.h @@ -1013,7 +1013,7 @@ public: /** * \return The name of this test */ - std::string GetName (void) const; + std::string GetName () const; protected: /** @@ -1055,13 +1055,13 @@ protected: * * \return \c true if any of the tests have failed, \c false otherwise. */ - bool IsStatusFailure (void) const; + bool IsStatusFailure () const; /** * \brief Check if all tests passed. * * \return \c true if the tests have succeeded, \c false otherwise. */ - bool IsStatusSuccess (void) const; + bool IsStatusSuccess () const; /** * \brief Get the parent of this TestCsse. @@ -1094,13 +1094,13 @@ protected: * * \return \c true if we should assert on failure. */ - bool MustAssertOnFailure (void) const; + bool MustAssertOnFailure () const; /** * \brief Check if this run should continue on failure. * * \return \c true if we should continue on failure. */ - bool MustContinueOnFailure (void) const; + bool MustContinueOnFailure () const; /** * \brief Construct the full path to a file in the data directory. * @@ -1134,14 +1134,14 @@ private: * Subclasses should override this method to perform any costly * per-test setup before DoRun is invoked. */ - virtual void DoSetup (void); + virtual void DoSetup (); /** * \brief Implementation to actually run this TestCase. * * Subclasses should override this method to conduct their tests. */ - virtual void DoRun (void) = 0; + virtual void DoRun () = 0; /** * \brief Implementation to do any local setup required for this @@ -1150,7 +1150,7 @@ private: * Subclasses should override this method to perform any costly * per-test teardown */ - virtual void DoTeardown (void); + virtual void DoTeardown (); // methods called by TestRunnerImpl /** @@ -1160,7 +1160,7 @@ private: */ void Run (TestRunnerImpl *runner); /** \copydoc IsStatusFailure() */ - bool IsFailed (void) const; + bool IsFailed () const; /** * \ingroup testingimpl @@ -1213,11 +1213,11 @@ public: * * \returns The Type of the suite. */ - TestSuite::Type GetTestType (void); + TestSuite::Type GetTestType (); private: // Inherited - virtual void DoRun (void); + virtual void DoRun (); TestSuite::Type m_type; //!< Type of this TestSuite }; @@ -1281,7 +1281,7 @@ public: * \brief Get the total number of test vectors. * \return The number of test vectors */ - std::size_t GetN (void) const; + std::size_t GetN () const; /** * \brief Get the i'th test vector * \param [in] i The requested vector index @@ -1321,7 +1321,7 @@ TestVectors::Add (T vector) template std::size_t -TestVectors::GetN (void) const +TestVectors::GetN () const { return m_vectors.size (); } diff --git a/src/core/model/time.cc b/src/core/model/time.cc index c4572de39..4a1325ec6 100644 --- a/src/core/model/time.cc +++ b/src/core/model/time.cc @@ -66,7 +66,7 @@ namespace { * \returns The array of scale factors between units. */ long double * - InitUnitValue (void) + InitUnitValue () { static long double values[Time::LAST]; for (auto u = static_cast (Time::Y); u != static_cast (Time::LAST); ++u) @@ -200,7 +200,7 @@ Time::Time (const std::string& s) // static struct Time::Resolution& -Time::SetDefaultNsResolution (void) +Time::SetDefaultNsResolution () { NS_LOG_FUNCTION_NOARGS (); static struct Resolution resolution; @@ -407,7 +407,7 @@ Time::ConvertTimes (const enum Unit unit) // static enum Time::Unit -Time::GetResolution (void) +Time::GetResolution () { // No function log b/c it interferes with operator<< return PeekResolution ()->unit; @@ -537,24 +537,24 @@ MakeTimeChecker (const Time min, const Time max) } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } - virtual std::string GetValueTypeName (void) const + virtual std::string GetValueTypeName () const { NS_LOG_FUNCTION_NOARGS (); return "ns3::TimeValue"; } - virtual bool HasUnderlyingTypeInformation (void) const + virtual bool HasUnderlyingTypeInformation () const { NS_LOG_FUNCTION_NOARGS (); return true; } - virtual std::string GetUnderlyingTypeInformation (void) const + virtual std::string GetUnderlyingTypeInformation () const { NS_LOG_FUNCTION_NOARGS (); std::ostringstream oss; oss << "Time" << " " << m_minValue << ":" << m_maxValue; return oss.str (); } - virtual Ptr Create (void) const + virtual Ptr Create () const { NS_LOG_FUNCTION_NOARGS (); return ns3::Create (); diff --git a/src/core/model/timer-impl.h b/src/core/model/timer-impl.h index 4aef1cba0..a5716382c 100644 --- a/src/core/model/timer-impl.h +++ b/src/core/model/timer-impl.h @@ -129,7 +129,7 @@ public: */ virtual EventId Schedule (const Time &delay) = 0; /** Invoke the expire function. */ - virtual void Invoke (void) = 0; + virtual void Invoke () = 0; }; } // namespace ns3 @@ -272,7 +272,7 @@ MakeTimerImpl (IntToType<0>, FN fn) { return Simulator::Schedule (delay, m_fn); } - virtual void Invoke (void) + virtual void Invoke () { m_fn (); } @@ -306,7 +306,7 @@ MakeTimerImpl (IntToType<1>, FN fn) { return Simulator::Schedule (delay, m_fn, m_a1); } - virtual void Invoke (void) + virtual void Invoke () { m_fn (m_a1); } @@ -345,7 +345,7 @@ MakeTimerImpl (IntToType<2>, FN fn) { return Simulator::Schedule (delay, m_fn, m_a1, m_a2); } - virtual void Invoke (void) + virtual void Invoke () { m_fn (m_a1, m_a2); } @@ -389,7 +389,7 @@ MakeTimerImpl (IntToType<3>, FN fn) { return Simulator::Schedule (delay, m_fn, m_a1, m_a2, m_a3); } - virtual void Invoke (void) + virtual void Invoke () { m_fn (m_a1, m_a2, m_a3); } @@ -438,7 +438,7 @@ MakeTimerImpl (IntToType<4>, FN fn) { return Simulator::Schedule (delay, m_fn, m_a1, m_a2, m_a3, m_a4); } - virtual void Invoke (void) + virtual void Invoke () { m_fn (m_a1, m_a2, m_a3, m_a4); } @@ -492,7 +492,7 @@ MakeTimerImpl (IntToType<5>, FN fn) { return Simulator::Schedule (delay, m_fn, m_a1, m_a2, m_a3, m_a4, m_a5); } - virtual void Invoke (void) + virtual void Invoke () { m_fn (m_a1, m_a2, m_a3, m_a4, m_a5); } @@ -551,7 +551,7 @@ MakeTimerImpl (IntToType<6>, FN fn) { return Simulator::Schedule (delay, m_fn, m_a1, m_a2, m_a3, m_a4, m_a5, m_a6); } - virtual void Invoke (void) + virtual void Invoke () { m_fn (m_a1, m_a2, m_a3, m_a4, m_a5, m_a6); } @@ -640,7 +640,7 @@ MakeTimerImpl (IntToType<0>, MEM_PTR memPtr, OBJ_PTR objPtr) { return Simulator::Schedule (delay, m_memPtr, m_objPtr); } - virtual void Invoke (void) + virtual void Invoke () { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(); } @@ -676,7 +676,7 @@ MakeTimerImpl (IntToType<1>, MEM_PTR memPtr, OBJ_PTR objPtr) { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1); } - virtual void Invoke (void) + virtual void Invoke () { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1); } @@ -717,7 +717,7 @@ MakeTimerImpl (IntToType<2>, MEM_PTR memPtr, OBJ_PTR objPtr) { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2); } - virtual void Invoke (void) + virtual void Invoke () { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1, m_a2); } @@ -763,7 +763,7 @@ MakeTimerImpl (IntToType<3>, MEM_PTR memPtr, OBJ_PTR objPtr) { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2, m_a3); } - virtual void Invoke (void) + virtual void Invoke () { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1, m_a2, m_a3); } @@ -814,7 +814,7 @@ MakeTimerImpl (IntToType<4>, MEM_PTR memPtr, OBJ_PTR objPtr) { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2, m_a3, m_a4); } - virtual void Invoke (void) + virtual void Invoke () { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1, m_a2, m_a3, m_a4); } @@ -870,7 +870,7 @@ MakeTimerImpl (IntToType<5>, MEM_PTR memPtr, OBJ_PTR objPtr) { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2, m_a3, m_a4, m_a5); } - virtual void Invoke (void) + virtual void Invoke () { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1, m_a2, m_a3, m_a4, m_a5); } @@ -931,7 +931,7 @@ MakeTimerImpl (IntToType<6>, MEM_PTR memPtr, OBJ_PTR objPtr) { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2, m_a3, m_a4, m_a5, m_a6); } - virtual void Invoke (void) + virtual void Invoke () { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1, m_a2, m_a3, m_a4, m_a5, m_a6); } diff --git a/src/core/model/timer.cc b/src/core/model/timer.cc index 1b9d6fa24..ffc172bbc 100644 --- a/src/core/model/timer.cc +++ b/src/core/model/timer.cc @@ -78,13 +78,13 @@ Timer::SetDelay (const Time &time) m_delay = time; } Time -Timer::GetDelay (void) const +Timer::GetDelay () const { NS_LOG_FUNCTION (this); return m_delay; } Time -Timer::GetDelayLeft (void) const +Timer::GetDelayLeft () const { NS_LOG_FUNCTION (this); switch (GetState ()) @@ -106,37 +106,37 @@ Timer::GetDelayLeft (void) const } void -Timer::Cancel (void) +Timer::Cancel () { NS_LOG_FUNCTION (this); m_event.Cancel (); } void -Timer::Remove (void) +Timer::Remove () { NS_LOG_FUNCTION (this); m_event.Remove (); } bool -Timer::IsExpired (void) const +Timer::IsExpired () const { NS_LOG_FUNCTION (this); return !IsSuspended () && m_event.IsExpired (); } bool -Timer::IsRunning (void) const +Timer::IsRunning () const { NS_LOG_FUNCTION (this); return !IsSuspended () && m_event.IsRunning (); } bool -Timer::IsSuspended (void) const +Timer::IsSuspended () const { NS_LOG_FUNCTION (this); return (m_flags & TIMER_SUSPENDED) == TIMER_SUSPENDED; } enum Timer::State -Timer::GetState (void) const +Timer::GetState () const { NS_LOG_FUNCTION (this); if (IsRunning ()) @@ -155,7 +155,7 @@ Timer::GetState (void) const } void -Timer::Schedule (void) +Timer::Schedule () { NS_LOG_FUNCTION (this); Schedule (m_delay); @@ -174,7 +174,7 @@ Timer::Schedule (Time delay) } void -Timer::Suspend (void) +Timer::Suspend () { NS_LOG_FUNCTION (this); NS_ASSERT (IsRunning ()); @@ -191,7 +191,7 @@ Timer::Suspend (void) } void -Timer::Resume (void) +Timer::Resume () { NS_LOG_FUNCTION (this); NS_ASSERT (m_flags & TIMER_SUSPENDED); diff --git a/src/core/model/timer.h b/src/core/model/timer.h index 1cb713c77..65df8e48d 100644 --- a/src/core/model/timer.h +++ b/src/core/model/timer.h @@ -162,47 +162,47 @@ public: /** * \returns The currently-configured delay for the next Schedule. */ - Time GetDelay (void) const; + Time GetDelay () const; /** * \returns The amount of time left until this timer expires. * * This method returns zero if the timer is in EXPIRED state. */ - Time GetDelayLeft (void) const; + Time GetDelayLeft () const; /** * Cancel the currently-running event if there is one. Do nothing * otherwise. */ - void Cancel (void); + void Cancel (); /** * Remove from the simulation event-list the currently-running event * if there is one. Do nothing otherwise. */ - void Remove (void); + void Remove (); /** * \return \c true if there is no currently-running event, * \c false otherwise. */ - bool IsExpired (void) const; + bool IsExpired () const; /** * \return \c true if there is a currently-running event, * \c false otherwise. */ - bool IsRunning (void) const; + bool IsRunning () const; /** * \returns \c true if this timer was suspended and not yet resumed, * \c false otherwise. */ - bool IsSuspended (void) const; + bool IsSuspended () const; /** * \returns The current state of the timer. */ - enum Timer::State GetState (void) const; + enum Timer::State GetState () const; /** * Schedule a new event using the currently-configured delay, function, * and arguments. */ - void Schedule (void); + void Schedule (); /** * \param [in] delay the delay to use * @@ -223,13 +223,13 @@ public: * * Calling Suspend on a non-running timer is an error. */ - void Suspend (void); + void Suspend (); /** * Restart the timer to expire within the amount of time left saved * during Suspend. * Calling Resume without a prior call to Suspend is an error. */ - void Resume (void); + void Resume (); private: /** Internal bit marking the suspended state. */ diff --git a/src/core/model/traced-value.h b/src/core/model/traced-value.h index c262a1301..a28d0409f 100644 --- a/src/core/model/traced-value.h +++ b/src/core/model/traced-value.h @@ -91,7 +91,7 @@ typedef void (* Uint64)(uint64_t oldValue, uint64_t newValue); typedef void (* Double)(double oldValue, double newValue); /**@}*/ /** TracedValue Callback signature for void. */ -typedef void (* Void) (void); +typedef void (* Void) (); /**@}*/ } // namespace TracedValueCallback @@ -229,7 +229,7 @@ public: * Get the underlying value. * \returns The value. */ - T Get (void) const + T Get () const { return m_v; } diff --git a/src/core/model/trickle-timer.cc b/src/core/model/trickle-timer.cc index 16582da8d..a1aebb6bb 100644 --- a/src/core/model/trickle-timer.cc +++ b/src/core/model/trickle-timer.cc @@ -90,21 +90,21 @@ TrickleTimer::SetParameters (Time minInterval, uint8_t doublings, uint16_t redun } Time -TrickleTimer::GetMinInterval (void) const +TrickleTimer::GetMinInterval () const { NS_LOG_FUNCTION (this); return m_minInterval; } Time -TrickleTimer::GetMaxInterval (void) const +TrickleTimer::GetMaxInterval () const { NS_LOG_FUNCTION (this); return m_maxInterval; } uint8_t -TrickleTimer::GetDoublings (void) const +TrickleTimer::GetDoublings () const { NS_LOG_FUNCTION (this); @@ -130,14 +130,14 @@ TrickleTimer::GetDoublings (void) const } uint16_t -TrickleTimer::GetRedundancy (void) const +TrickleTimer::GetRedundancy () const { NS_LOG_FUNCTION (this); return m_redundancy; } Time -TrickleTimer::GetDelayLeft (void) const +TrickleTimer::GetDelayLeft () const { NS_LOG_FUNCTION (this); @@ -150,7 +150,7 @@ TrickleTimer::GetDelayLeft (void) const } Time -TrickleTimer::GetIntervalLeft (void) const +TrickleTimer::GetIntervalLeft () const { NS_LOG_FUNCTION (this); @@ -235,7 +235,7 @@ TrickleTimer::Stop () } void -TrickleTimer::TimerExpire(void) +TrickleTimer::TimerExpire() { NS_LOG_FUNCTION (this); @@ -246,7 +246,7 @@ TrickleTimer::TimerExpire(void) } void -TrickleTimer::IntervalExpire(void) +TrickleTimer::IntervalExpire() { NS_LOG_FUNCTION (this); diff --git a/src/core/model/trickle-timer.h b/src/core/model/trickle-timer.h index 40293bb40..42bdf7dd9 100644 --- a/src/core/model/trickle-timer.h +++ b/src/core/model/trickle-timer.h @@ -121,7 +121,7 @@ public: * \brief Get the MinInterval of the timer. * \return The MinInterval */ - Time GetMinInterval (void) const; + Time GetMinInterval () const; /** * \brief Get the MaxInterval of the timer. @@ -129,33 +129,33 @@ public: * The timer MaxInterval is always std::exp2 (doublings) * minInterval * \return The MaxInterval */ - Time GetMaxInterval (void) const; + Time GetMaxInterval () const; /** * \brief Get the doublings of the timer. * \return The doublings */ - uint8_t GetDoublings (void) const; + uint8_t GetDoublings () const; /** * \brief Get the Redundancy constant of the timer. * \return The Redundancy */ - uint16_t GetRedundancy (void) const; + uint16_t GetRedundancy () const; /** * \returns The amount of time left until this timer expires. * * This method returns zero if the timer has never been started. */ - Time GetDelayLeft (void) const; + Time GetDelayLeft () const; /** * \returns The amount of time left until this timer interval expires. * * This method returns zero if the timer has never been started. */ - Time GetIntervalLeft (void) const; + Time GetIntervalLeft () const; /** * \brief Enable the timer. @@ -223,9 +223,9 @@ public: private: /** Internal callback invoked when the timer expires. */ - void TimerExpire (void); + void TimerExpire (); /** Internal callback invoked when the interval expires. */ - void IntervalExpire (void); + void IntervalExpire (); /** * The timer implementation, which contains the bound callback diff --git a/src/core/model/tuple.h b/src/core/model/tuple.h index 7a20f9ac5..3cb8ae71e 100644 --- a/src/core/model/tuple.h +++ b/src/core/model/tuple.h @@ -83,7 +83,7 @@ public: */ TupleValue (const result_type &value); - Ptr Copy (void) const override; + Ptr Copy () const override; bool DeserializeFromString (std::string value, Ptr checker) override; std::string SerializeToString (Ptr checker) const override; @@ -94,7 +94,7 @@ public: * a tuple of Ptr where AV is a class derived from AttributeValue. * \return stored values as a std::tuple */ - result_type Get (void) const; + result_type Get () const; /** * Set the stored values. */ @@ -104,7 +104,7 @@ public: * Get the attribute values as a tuple. * \return the attribute values as a tuple */ - value_type GetValue (void) const; + value_type GetValue () const; /** * Set the given variable to the values stored by this TupleValue object. @@ -161,7 +161,7 @@ public: * * \return the checkers for all tuple elements */ - virtual const std::vector>& GetCheckers (void) const = 0; + virtual const std::vector>& GetCheckers () const = 0; }; @@ -229,7 +229,7 @@ TupleValue::TupleValue (const result_type &value) template Ptr -TupleValue::Copy (void) const +TupleValue::Copy () const { return Create > (Get ()); } @@ -311,7 +311,7 @@ TupleValue::SerializeToString (Ptr checker) con template typename TupleValue::result_type -TupleValue::Get (void) const +TupleValue::Get () const { return std::apply ([](Args... values) { @@ -333,7 +333,7 @@ TupleValue::Set (const typename TupleValue::result_type &value template typename TupleValue::value_type -TupleValue::GetValue (void) const +TupleValue::GetValue () const { return m_value; } @@ -373,7 +373,7 @@ public: : m_checkers {checkers...} { } - const std::vector>& GetCheckers (void) const override + const std::vector>& GetCheckers () const override { return m_checkers; } @@ -391,19 +391,19 @@ public: }, v->GetValue ()); } - std::string GetValueTypeName (void) const override + std::string GetValueTypeName () const override { return "ns3::TupleValue"; } - bool HasUnderlyingTypeInformation (void) const override + bool HasUnderlyingTypeInformation () const override { return false; } - std::string GetUnderlyingTypeInformation (void) const override + std::string GetUnderlyingTypeInformation () const override { return ""; } - Ptr Create (void) const override + Ptr Create () const override { return ns3::Create> (); } diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc index d11ced560..0c87ff8a4 100644 --- a/src/core/model/type-id.cc +++ b/src/core/model/type-id.cc @@ -171,7 +171,7 @@ public: * Get the total number of type ids. * \returns The total number. */ - uint16_t GetRegisteredN (void) const; + uint16_t GetRegisteredN () const; /** * Get a type id by index. * @@ -599,7 +599,7 @@ IidManager::HasConstructor (uint16_t uid) const } uint16_t -IidManager::GetRegisteredN (void) const +IidManager::GetRegisteredN () const { NS_LOG_FUNCTION (IID << m_information.size ()); return static_cast (m_information.size ()); @@ -866,7 +866,7 @@ TypeId::LookupByHashFailSafe (hash_t hash, TypeId *tid) } uint16_t -TypeId::GetRegisteredN (void) +TypeId::GetRegisteredN () { NS_LOG_FUNCTION_NOARGS (); return IidManager::Get ()->GetRegisteredN (); @@ -940,14 +940,14 @@ TypeId::SetSize (std::size_t size) return *this; } TypeId -TypeId::GetParent (void) const +TypeId::GetParent () const { NS_LOG_FUNCTION (this); uint16_t parent = IidManager::Get ()->GetParent (m_tid); return TypeId (parent); } bool -TypeId::HasParent (void) const +TypeId::HasParent () const { NS_LOG_FUNCTION (this); uint16_t parent = IidManager::Get ()->GetParent (m_tid); @@ -965,7 +965,7 @@ TypeId::IsChildOf (TypeId other) const return tmp == other && *this != other; } std::string -TypeId::GetGroupName (void) const +TypeId::GetGroupName () const { NS_LOG_FUNCTION (this); std::string groupName = IidManager::Get ()->GetGroupName (m_tid); @@ -973,7 +973,7 @@ TypeId::GetGroupName (void) const } std::string -TypeId::GetName (void) const +TypeId::GetName () const { NS_LOG_FUNCTION (this); std::string name = IidManager::Get ()->GetName (m_tid); @@ -981,13 +981,13 @@ TypeId::GetName (void) const } TypeId::hash_t -TypeId::GetHash (void) const +TypeId::GetHash () const { hash_t hash = IidManager::Get ()->GetHash (m_tid); return hash; } std::size_t -TypeId::GetSize (void) const +TypeId::GetSize () const { NS_LOG_FUNCTION (this); std::size_t size = IidManager::Get ()->GetSize (m_tid); @@ -995,7 +995,7 @@ TypeId::GetSize (void) const } bool -TypeId::HasConstructor (void) const +TypeId::HasConstructor () const { NS_LOG_FUNCTION (this); bool hasConstructor = IidManager::Get ()->HasConstructor (m_tid); @@ -1057,7 +1057,7 @@ TypeId::SetAttributeInitialValue (std::size_t i, Callback -TypeId::GetConstructor (void) const +TypeId::GetConstructor () const { NS_LOG_FUNCTION (this); Callback cb = IidManager::Get ()->GetConstructor (m_tid); @@ -1065,7 +1065,7 @@ TypeId::GetConstructor (void) const } bool -TypeId::MustHideFromDocumentation (void) const +TypeId::MustHideFromDocumentation () const { NS_LOG_FUNCTION (this); bool mustHide = IidManager::Get ()->MustHideFromDocumentation (m_tid); @@ -1073,7 +1073,7 @@ TypeId::MustHideFromDocumentation (void) const } std::size_t -TypeId::GetAttributeN (void) const +TypeId::GetAttributeN () const { NS_LOG_FUNCTION (this); std::size_t n = IidManager::Get ()->GetAttributeN (m_tid); @@ -1094,7 +1094,7 @@ TypeId::GetAttributeFullName (std::size_t i) const } std::size_t -TypeId::GetTraceSourceN (void) const +TypeId::GetTraceSourceN () const { NS_LOG_FUNCTION (this); return IidManager::Get ()->GetTraceSourceN (m_tid); @@ -1124,7 +1124,7 @@ TypeId::AddTraceSource (std::string name, } TypeId -TypeId::HideFromDocumentation (void) +TypeId::HideFromDocumentation () { NS_LOG_FUNCTION (this); IidManager::Get ()->HideFromDocumentation (m_tid); @@ -1181,7 +1181,7 @@ TypeId::LookupTraceSourceByName (std::string name) const } uint16_t -TypeId::GetUid (void) const +TypeId::GetUid () const { NS_LOG_FUNCTION (this); return m_tid; diff --git a/src/core/model/type-id.h b/src/core/model/type-id.h index 582acfd23..0e43a74db 100644 --- a/src/core/model/type-id.h +++ b/src/core/model/type-id.h @@ -159,7 +159,7 @@ public: * * \returns The number of TypeId instances registered. */ - static uint16_t GetRegisteredN (void); + static uint16_t GetRegisteredN (); /** * Get a TypeId by index. * @@ -189,14 +189,14 @@ public: * case for the TypeId associated to the ns3::ObjectBase class * only. */ - TypeId GetParent (void) const; + TypeId GetParent () const; /** * Check if this TypeId has a parent. * * \return \c true if this TypeId has a parent. */ - bool HasParent (void) const; + bool HasParent () const; /** * Check if this TypeId is a child of another. @@ -215,42 +215,42 @@ public: * * \returns The name of the group associated to this TypeId. */ - std::string GetGroupName (void) const; + std::string GetGroupName () const; /** * Get the name. * * \returns The name of this interface. */ - std::string GetName (void) const; + std::string GetName () const; /** * Get the hash. * * \returns The hash of this interface. */ - hash_t GetHash (void) const; + hash_t GetHash () const; /** * Get the size of this object. * * \returns The size of this interface. */ - std::size_t GetSize (void) const; + std::size_t GetSize () const; /** * Check if this TypeId has a constructor. * * \returns \c true if this TypeId has a constructor */ - bool HasConstructor (void) const; + bool HasConstructor () const; /** * Get the number of attributes. * * \returns The number of attributes associated to this TypeId */ - std::size_t GetAttributeN (void) const; + std::size_t GetAttributeN () const; /** * Get Attribute information by index. * @@ -272,14 +272,14 @@ public: * \returns A callback which can be used to instantiate an object * of this type. */ - Callback GetConstructor (void) const; + Callback GetConstructor () const; /** * Check if this TypeId should not be listed in documentation. * * \returns \c true if this TypeId should be hidden from the user. */ - bool MustHideFromDocumentation (void) const; + bool MustHideFromDocumentation () const; /** @@ -287,7 +287,7 @@ public: * * \returns The number of trace sources defined in this TypeId. */ - std::size_t GetTraceSourceN (void) const; + std::size_t GetTraceSourceN () const; /** * Get the trace source by index. * @@ -316,7 +316,7 @@ public: * of the base class of the subclass. */ template - TypeId SetParent (void); + TypeId SetParent (); /** * Set the group name. @@ -354,7 +354,7 @@ public: * \returns This TypeId instance */ template - TypeId AddConstructor (void); + TypeId AddConstructor (); /** * Record in this TypeId the fact that a new attribute exists. @@ -460,7 +460,7 @@ public: * Hide this TypeId from documentation. * \returns This TypeId instance. */ - TypeId HideFromDocumentation (void); + TypeId HideFromDocumentation (); /** * Find an Attribute by name, retrieving the associated AttributeInformation. @@ -504,7 +504,7 @@ public: * This is really an internal method which users are not expected * to use. */ - uint16_t GetUid (void) const; + uint16_t GetUid () const; /** * Set the internal id of this TypeId. * @@ -628,14 +628,14 @@ inline bool operator != (TypeId a, TypeId b) template TypeId -TypeId::SetParent (void) +TypeId::SetParent () { return SetParent (T::GetTypeId ()); } template TypeId -TypeId::AddConstructor (void) +TypeId::AddConstructor () { struct Maker { diff --git a/src/core/model/type-name.h b/src/core/model/type-name.h index 860b2bf49..178094d35 100644 --- a/src/core/model/type-name.h +++ b/src/core/model/type-name.h @@ -43,7 +43,7 @@ namespace ns3 { * \returns The type name as a string. */ template -std::string TypeNameGet (void) +std::string TypeNameGet () { NS_FATAL_ERROR ("Type name not defined."); return "unknown"; diff --git a/src/core/model/uinteger.cc b/src/core/model/uinteger.cc index 5acae7e17..2fd174df5 100644 --- a/src/core/model/uinteger.cc +++ b/src/core/model/uinteger.cc @@ -65,24 +65,24 @@ Ptr MakeUintegerChecker (uint64_t min, uint64_t max, std } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } - virtual std::string GetValueTypeName (void) const + virtual std::string GetValueTypeName () const { NS_LOG_FUNCTION_NOARGS (); return "ns3::UintegerValue"; } - virtual bool HasUnderlyingTypeInformation (void) const + virtual bool HasUnderlyingTypeInformation () const { NS_LOG_FUNCTION_NOARGS (); return true; } - virtual std::string GetUnderlyingTypeInformation (void) const + virtual std::string GetUnderlyingTypeInformation () const { NS_LOG_FUNCTION_NOARGS (); std::ostringstream oss; oss << m_name << " " << m_minValue << ":" << m_maxValue; return oss.str (); } - virtual Ptr Create (void) const + virtual Ptr Create () const { NS_LOG_FUNCTION_NOARGS (); return ns3::Create (); diff --git a/src/core/model/uinteger.h b/src/core/model/uinteger.h index 638ee2052..e8b80d3d0 100644 --- a/src/core/model/uinteger.h +++ b/src/core/model/uinteger.h @@ -45,7 +45,7 @@ ATTRIBUTE_VALUE_DEFINE_WITH_NAME (uint64_t, Uinteger); ATTRIBUTE_ACCESSOR_DEFINE (Uinteger); template -Ptr MakeUintegerChecker (void); +Ptr MakeUintegerChecker (); /** * Make a checker with a minimum value. @@ -91,7 +91,7 @@ Ptr MakeUintegerChecker (uint64_t min, uint64_t max, std template -Ptr MakeUintegerChecker (void) +Ptr MakeUintegerChecker () { return internal::MakeUintegerChecker (std::numeric_limits::min (), std::numeric_limits::max (), diff --git a/src/core/model/unix-fd-reader.cc b/src/core/model/unix-fd-reader.cc index d72c8b86e..e3695ab10 100644 --- a/src/core/model/unix-fd-reader.cc +++ b/src/core/model/unix-fd-reader.cc @@ -110,14 +110,14 @@ void FdReader::Start (int fd, Callback readCallback) m_readThread = std::thread (&FdReader::Run, this); } -void FdReader::DestroyEvent (void) +void FdReader::DestroyEvent () { NS_LOG_FUNCTION (this); Stop (); this->Unref (); } -void FdReader::Stop (void) +void FdReader::Stop () { NS_LOG_FUNCTION (this); m_stop = true; @@ -160,7 +160,7 @@ void FdReader::Stop (void) } // This runs in a separate thread -void FdReader::Run (void) +void FdReader::Run () { NS_LOG_FUNCTION (this); int nfds; diff --git a/src/core/model/unix-fd-reader.h b/src/core/model/unix-fd-reader.h index cf9326521..934b76604 100644 --- a/src/core/model/unix-fd-reader.h +++ b/src/core/model/unix-fd-reader.h @@ -66,7 +66,7 @@ public: * Stop the read thread and reset internal state. This does not * close the file descriptor used for reading. */ - void Stop (void); + void Stop (); protected: @@ -105,7 +105,7 @@ protected: * * \return A structure representing what was read. */ - virtual FdReader::Data DoRead (void) = 0; + virtual FdReader::Data DoRead () = 0; /** * \brief The file descriptor to read from. @@ -115,9 +115,9 @@ protected: private: /** The asynchronous function which performs the read. */ - void Run (void); + void Run (); /** Event handler scheduled for destroy time to halt the thread. */ - void DestroyEvent (void); + void DestroyEvent (); /** The main thread callback function to invoke when we have data. */ Callback m_readCallback; diff --git a/src/core/model/vector.cc b/src/core/model/vector.cc index bf7e19dd3..8024e0cc8 100644 --- a/src/core/model/vector.cc +++ b/src/core/model/vector.cc @@ -38,7 +38,7 @@ ATTRIBUTE_HELPER_CPP (Vector3D); ATTRIBUTE_HELPER_CPP (Vector2D); // compatibility for mobility code -Ptr MakeVectorChecker (void) +Ptr MakeVectorChecker () { NS_LOG_FUNCTION_NOARGS (); return MakeVector3DChecker (); diff --git a/src/core/model/vector.h b/src/core/model/vector.h index 262ea1e42..e0c691cea 100644 --- a/src/core/model/vector.h +++ b/src/core/model/vector.h @@ -358,7 +358,7 @@ ATTRIBUTE_ACCESSOR_DEFINE (Vector); * \returns The AttributeChecker. * \see AttributeChecker */ -Ptr MakeVectorChecker (void); +Ptr MakeVectorChecker (); } // namespace ns3 diff --git a/src/core/model/wall-clock-synchronizer.cc b/src/core/model/wall-clock-synchronizer.cc index 078b68f13..db090d7cb 100644 --- a/src/core/model/wall-clock-synchronizer.cc +++ b/src/core/model/wall-clock-synchronizer.cc @@ -39,7 +39,7 @@ NS_LOG_COMPONENT_DEFINE ("WallClockSynchronizer"); NS_OBJECT_ENSURE_REGISTERED (WallClockSynchronizer); TypeId -WallClockSynchronizer::GetTypeId (void) +WallClockSynchronizer::GetTypeId () { static TypeId tid = TypeId ("ns3::WallClockSynchronizer") .SetParent () @@ -88,14 +88,14 @@ WallClockSynchronizer::~WallClockSynchronizer () } bool -WallClockSynchronizer::DoRealtime (void) +WallClockSynchronizer::DoRealtime () { NS_LOG_FUNCTION (this); return true; } uint64_t -WallClockSynchronizer::DoGetCurrentRealtime (void) +WallClockSynchronizer::DoGetCurrentRealtime () { NS_LOG_FUNCTION (this); return GetNormalizedRealtime (); @@ -276,7 +276,7 @@ WallClockSynchronizer::DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay) } void -WallClockSynchronizer::DoSignal (void) +WallClockSynchronizer::DoSignal () { NS_LOG_FUNCTION (this); @@ -298,14 +298,14 @@ WallClockSynchronizer::DoSetCondition (bool cond) } void -WallClockSynchronizer::DoEventStart (void) +WallClockSynchronizer::DoEventStart () { NS_LOG_FUNCTION (this); m_nsEventStart = GetNormalizedRealtime (); } uint64_t -WallClockSynchronizer::DoEventEnd (void) +WallClockSynchronizer::DoEventEnd () { NS_LOG_FUNCTION (this); return GetNormalizedRealtime () - m_nsEventStart; @@ -378,7 +378,7 @@ WallClockSynchronizer::DriftCorrect (uint64_t nsNow, uint64_t nsDelay) } uint64_t -WallClockSynchronizer::GetRealtime (void) +WallClockSynchronizer::GetRealtime () { NS_LOG_FUNCTION (this); auto now = std::chrono::system_clock::now().time_since_epoch(); @@ -386,7 +386,7 @@ WallClockSynchronizer::GetRealtime (void) } uint64_t -WallClockSynchronizer::GetNormalizedRealtime (void) +WallClockSynchronizer::GetNormalizedRealtime () { NS_LOG_FUNCTION (this); return GetRealtime () - m_realtimeOriginNano; diff --git a/src/core/model/wall-clock-synchronizer.h b/src/core/model/wall-clock-synchronizer.h index 7f3bc60b0..e367a0161 100644 --- a/src/core/model/wall-clock-synchronizer.h +++ b/src/core/model/wall-clock-synchronizer.h @@ -72,7 +72,7 @@ public: * Get the registered TypeId for this class. * @returns The TypeId. */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ WallClockSynchronizer (); @@ -128,14 +128,14 @@ protected: // Inherited from Synchronizer virtual void DoSetOrigin (uint64_t ns); - virtual bool DoRealtime (void); - virtual uint64_t DoGetCurrentRealtime (void); + virtual bool DoRealtime (); + virtual uint64_t DoGetCurrentRealtime (); virtual bool DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay); - virtual void DoSignal (void); + virtual void DoSignal (); virtual void DoSetCondition (bool cond); virtual int64_t DoGetDrift (uint64_t ns); - virtual void DoEventStart (void); - virtual uint64_t DoEventEnd (void); + virtual void DoEventStart (); + virtual uint64_t DoEventEnd (); /** * @brief Compute a correction to the nominal delay to account for @@ -153,13 +153,13 @@ protected: * * @returns The current real time, in ns. */ - uint64_t GetRealtime (void); + uint64_t GetRealtime (); /** * @brief Get the current normalized real time, in ns. * * @returns The current normalized real time, in ns. */ - uint64_t GetNormalizedRealtime (void); + uint64_t GetNormalizedRealtime (); /** Size of the system clock tick, as reported by @c clock_getres, in ns. */ uint64_t m_jiffy; diff --git a/src/core/model/watchdog.cc b/src/core/model/watchdog.cc index 109a8ef81..de54ca570 100644 --- a/src/core/model/watchdog.cc +++ b/src/core/model/watchdog.cc @@ -60,7 +60,7 @@ Watchdog::Ping (Time delay) } void -Watchdog::Expire (void) +Watchdog::Expire () { NS_LOG_FUNCTION (this); if (m_end == Simulator::Now ()) diff --git a/src/core/model/watchdog.h b/src/core/model/watchdog.h index 09c36a8ea..5efb73790 100644 --- a/src/core/model/watchdog.h +++ b/src/core/model/watchdog.h @@ -111,7 +111,7 @@ public: private: /** Internal callback invoked when the timer expires. */ - void Expire (void); + void Expire (); /** * The timer implementation, which contains the bound callback * function and arguments. diff --git a/src/core/test/attribute-container-test-suite.cc b/src/core/test/attribute-container-test-suite.cc index 9a5941d8a..6f3fcf6fe 100644 --- a/src/core/test/attribute-container-test-suite.cc +++ b/src/core/test/attribute-container-test-suite.cc @@ -80,7 +80,7 @@ public: * * \return the vector of ints */ - std::vector GetIntVec (void) const; + std::vector GetIntVec () const; /** * \brief Stream insertion operator. @@ -152,7 +152,7 @@ AttributeContainerObject::SetIntVec (std::vector vec) } std::vector -AttributeContainerObject::GetIntVec (void) const +AttributeContainerObject::GetIntVec () const { return m_intvec; } @@ -305,7 +305,7 @@ public: virtual ~AttributeContainerSerializationTestCase () {} private: - virtual void DoRun (void); + virtual void DoRun (); }; AttributeContainerSerializationTestCase::AttributeContainerSerializationTestCase () @@ -315,7 +315,7 @@ AttributeContainerSerializationTestCase::AttributeContainerSerializationTestCase } void -AttributeContainerSerializationTestCase::DoRun (void) +AttributeContainerSerializationTestCase::DoRun () { { // notice embedded spaces @@ -395,7 +395,7 @@ public: virtual ~AttributeContainerSetGetTestCase () {} private: - virtual void DoRun (void); + virtual void DoRun (); }; AttributeContainerSetGetTestCase::AttributeContainerSetGetTestCase () @@ -405,7 +405,7 @@ AttributeContainerSetGetTestCase::AttributeContainerSetGetTestCase () } void -AttributeContainerSetGetTestCase::DoRun (void) +AttributeContainerSetGetTestCase::DoRun () { Ptr obj = CreateObject (); { diff --git a/src/core/test/attribute-test-suite.cc b/src/core/test/attribute-test-suite.cc index cd144c3de..10f59003b 100644 --- a/src/core/test/attribute-test-suite.cc +++ b/src/core/test/attribute-test-suite.cc @@ -122,7 +122,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void) + static TypeId GetTypeId () { static TypeId tid = TypeId ("ns3::Derived") .AddConstructor () @@ -155,7 +155,7 @@ public: * \brief Get the type ID. * \return The object TypeId. */ - static TypeId GetTypeId (void) + static TypeId GetTypeId () { static TypeId tid = TypeId ("ns3::AttributeObjectTest") .AddConstructor () @@ -290,20 +290,20 @@ public: return tid; } - AttributeObjectTest (void) + AttributeObjectTest () { } - virtual ~AttributeObjectTest (void) + virtual ~AttributeObjectTest () {} /// Add an object to the first vector. - void AddToVector1 (void) + void AddToVector1 () { m_vector1.push_back (CreateObject ()); } /// Add an object to the second vector. - void AddToVector2 (void) + void AddToVector2 () { m_vector2.push_back (CreateObject ()); } @@ -353,7 +353,7 @@ private: * Get the m_boolTestA value. * \return the value of m_boolTestA. */ - bool DoGetTestA (void) const + bool DoGetTestA () const { return m_boolTestA; } @@ -361,7 +361,7 @@ private: * Get the m_int16SetGet value. * \return the value of m_int16SetGet. */ - int16_t DoGetInt16 (void) const + int16_t DoGetInt16 () const { return m_int16SetGet; } @@ -377,7 +377,7 @@ private: * Get the length of m_vector2. * \return the vector size. */ - std::size_t DoGetVectorN (void) const + std::size_t DoGetVectorN () const { return m_vector2.size (); } @@ -404,7 +404,7 @@ private: * Get the m_intSrc2 value. * \return the value of m_intSrc2. */ - int8_t DoGetIntSrc (void) const + int8_t DoGetIntSrc () const { return m_intSrc2; } @@ -422,7 +422,7 @@ private: * Get the m_enumSetGet value. * \return the value of m_enumSetGet. */ - Test_e DoGetEnum (void) const + Test_e DoGetEnum () const { return m_enumSetGet; } @@ -479,7 +479,7 @@ public: virtual ~AttributeTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); /** * Check the attribute path and value. * \param p The object to test. @@ -529,7 +529,7 @@ AttributeTestCase::CheckGetCodePaths ( // The actual Attribute type test cases are specialized for each Attribute type // =========================================================================== template <> void -AttributeTestCase::DoRun (void) +AttributeTestCase::DoRun () { Ptr p; bool ok; @@ -621,7 +621,7 @@ AttributeTestCase::DoRun (void) } template <> void -AttributeTestCase::DoRun (void) +AttributeTestCase::DoRun () { Ptr p; bool ok; @@ -731,7 +731,7 @@ AttributeTestCase::DoRun (void) } template <> void -AttributeTestCase::DoRun (void) +AttributeTestCase::DoRun () { Ptr p; bool ok; @@ -802,7 +802,7 @@ AttributeTestCase::DoRun (void) } template <> void -AttributeTestCase::DoRun (void) +AttributeTestCase::DoRun () { Ptr p; bool ok; @@ -828,7 +828,7 @@ AttributeTestCase::DoRun (void) } template <> void -AttributeTestCase::DoRun (void) +AttributeTestCase::DoRun () { Ptr p; bool ok; @@ -899,7 +899,7 @@ AttributeTestCase::DoRun (void) } template <> void -AttributeTestCase::DoRun (void) +AttributeTestCase::DoRun () { Ptr p; bool ok; @@ -997,7 +997,7 @@ public: } private: - virtual void DoRun (void); + virtual void DoRun (); /// Callback used in the test. Callback m_cbValue; @@ -1019,7 +1019,7 @@ RandomVariableStreamAttributeTestCase::RandomVariableStreamAttributeTestCase (st {} void -RandomVariableStreamAttributeTestCase::DoRun (void) +RandomVariableStreamAttributeTestCase::DoRun () { Ptr p; bool ok; @@ -1059,7 +1059,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); }; ObjectVectorAttributeTestCase::ObjectVectorAttributeTestCase (std::string description) @@ -1067,7 +1067,7 @@ ObjectVectorAttributeTestCase::ObjectVectorAttributeTestCase (std::string descri {} void -ObjectVectorAttributeTestCase::DoRun (void) +ObjectVectorAttributeTestCase::DoRun () { Ptr p; ObjectVectorValue vector; @@ -1130,7 +1130,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); }; ObjectMapAttributeTestCase::ObjectMapAttributeTestCase (std::string description) @@ -1138,7 +1138,7 @@ ObjectMapAttributeTestCase::ObjectMapAttributeTestCase (std::string description) {} void -ObjectMapAttributeTestCase::DoRun (void) +ObjectMapAttributeTestCase::DoRun () { Ptr p; ObjectMapValue map; @@ -1202,7 +1202,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); }; IntegerTraceSourceAttributeTestCase::IntegerTraceSourceAttributeTestCase (std::string description) @@ -1210,7 +1210,7 @@ IntegerTraceSourceAttributeTestCase::IntegerTraceSourceAttributeTestCase (std::s {} void -IntegerTraceSourceAttributeTestCase::DoRun (void) +IntegerTraceSourceAttributeTestCase::DoRun () { Ptr p; IntegerValue iv; @@ -1300,7 +1300,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); /** * Notify the call of source 1. @@ -1319,7 +1319,7 @@ IntegerTraceSourceTestCase::IntegerTraceSourceTestCase (std::string description) {} void -IntegerTraceSourceTestCase::DoRun (void) +IntegerTraceSourceTestCase::DoRun () { Ptr p; bool ok; @@ -1386,7 +1386,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); /** * Notify the call of source 2. @@ -1407,7 +1407,7 @@ TracedCallbackTestCase::TracedCallbackTestCase (std::string description) {} void -TracedCallbackTestCase::DoRun (void) +TracedCallbackTestCase::DoRun () { Ptr p; bool ok; @@ -1475,7 +1475,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); /** * Notify the call of source 2. @@ -1496,7 +1496,7 @@ PointerAttributeTestCase::PointerAttributeTestCase (std::string description) {} void -PointerAttributeTestCase::DoRun (void) +PointerAttributeTestCase::DoRun () { Ptr p; bool ok; @@ -1613,7 +1613,7 @@ public: } private: - virtual void DoRun (void); + virtual void DoRun (); Callback m_cbValue; //!< The callback @@ -1634,7 +1634,7 @@ CallbackValueTestCase::CallbackValueTestCase (std::string description) {} void -CallbackValueTestCase::DoRun (void) +CallbackValueTestCase::DoRun () { Ptr p; bool ok; diff --git a/src/core/test/build-profile-test-suite.cc b/src/core/test/build-profile-test-suite.cc index 10f263f37..150f86165 100644 --- a/src/core/test/build-profile-test-suite.cc +++ b/src/core/test/build-profile-test-suite.cc @@ -51,15 +51,15 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); }; -BuildProfileTestCase::BuildProfileTestCase (void) +BuildProfileTestCase::BuildProfileTestCase () : TestCase ("Check build profile macros") {} void -BuildProfileTestCase::DoRun (void) +BuildProfileTestCase::DoRun () { int i = 0; int j = 0; diff --git a/src/core/test/callback-test-suite.cc b/src/core/test/callback-test-suite.cc index 350158ac5..3f94d1dd9 100644 --- a/src/core/test/callback-test-suite.cc +++ b/src/core/test/callback-test-suite.cc @@ -48,7 +48,7 @@ public: /** * Callback 1 target function. */ - void Target1 (void) + void Target1 () { m_test1 = true; } @@ -56,7 +56,7 @@ public: * Callback 2 target function. * \return two. */ - int Target2 (void) + int Target2 () { m_test2 = true; return 2; @@ -82,8 +82,8 @@ public: } private: - virtual void DoRun (void); - virtual void DoSetup (void); + virtual void DoRun (); + virtual void DoSetup (); bool m_test1; //!< true if Target1 has been called, false otherwise. bool m_test2; //!< true if Target2 has been called, false otherwise. @@ -105,7 +105,7 @@ static bool gBasicCallbackTest8; * Callback 5 target function. */ void -BasicCallbackTarget5 (void) +BasicCallbackTarget5 () { gBasicCallbackTest5 = true; } @@ -136,7 +136,7 @@ BasicCallbackTestCase::BasicCallbackTestCase () {} void -BasicCallbackTestCase::DoSetup (void) +BasicCallbackTestCase::DoSetup () { m_test1 = false; m_test2 = false; @@ -149,7 +149,7 @@ BasicCallbackTestCase::DoSetup (void) } void -BasicCallbackTestCase::DoRun (void) +BasicCallbackTestCase::DoRun () { // // Make sure we can declare and compile a Callback pointing to a member @@ -234,7 +234,7 @@ public: /** * Callback 1 target function. */ - void Target1 (void) + void Target1 () { m_test1 = true; } @@ -242,7 +242,7 @@ public: * Callback 2 target function. * \return two. */ - int Target2 (void) + int Target2 () { m_test2 = true; return 2; @@ -268,8 +268,8 @@ public: } private: - virtual void DoRun (void); - virtual void DoSetup (void); + virtual void DoRun (); + virtual void DoSetup (); bool m_test1; //!< true if Target1 has been called, false otherwise. bool m_test2; //!< true if Target2 has been called, false otherwise. @@ -290,7 +290,7 @@ static bool gMakeCallbackTest7; * MakeCallback 5 target function. */ void -MakeCallbackTarget5 (void) +MakeCallbackTarget5 () { gMakeCallbackTest5 = true; } @@ -321,7 +321,7 @@ MakeCallbackTestCase::MakeCallbackTestCase () {} void -MakeCallbackTestCase::DoSetup (void) +MakeCallbackTestCase::DoSetup () { m_test1 = false; m_test2 = false; @@ -333,7 +333,7 @@ MakeCallbackTestCase::DoSetup (void) } void -MakeCallbackTestCase::DoRun (void) +MakeCallbackTestCase::DoRun () { // // Make sure we can declare and make a Callback pointing to a member @@ -424,8 +424,8 @@ public: } private: - virtual void DoRun (void); - virtual void DoSetup (void); + virtual void DoRun (); + virtual void DoSetup (); }; /** @@ -587,7 +587,7 @@ MakeBoundCallbackTestCase::MakeBoundCallbackTestCase () {} void -MakeBoundCallbackTestCase::DoSetup (void) +MakeBoundCallbackTestCase::DoSetup () { gMakeBoundCallbackTest1 = 0; gMakeBoundCallbackTest2 = 0; @@ -614,7 +614,7 @@ MakeBoundCallbackTestCase::DoSetup (void) } void -MakeBoundCallbackTestCase::DoRun (void) +MakeBoundCallbackTestCase::DoRun () { // // This is slightly tricky to explain. A bound Callback allows us to package @@ -736,8 +736,8 @@ public: } private: - virtual void DoRun (void); - virtual void DoSetup (void); + virtual void DoRun (); + virtual void DoSetup (); }; /** @@ -759,12 +759,12 @@ CallbackEqualityTestCase::CallbackEqualityTestCase () } void -CallbackEqualityTestCase::DoSetup (void) +CallbackEqualityTestCase::DoSetup () { } void -CallbackEqualityTestCase::DoRun (void) +CallbackEqualityTestCase::DoRun () { // // Make sure that two callbacks pointing to the same member function @@ -880,14 +880,14 @@ public: /** * Callback 1 target function. */ - void Target1 (void) + void Target1 () { m_test1 = true; } private: - virtual void DoRun (void); - virtual void DoSetup (void); + virtual void DoRun (); + virtual void DoSetup (); bool m_test1; //!< true if Target1 has been called, false otherwise. }; @@ -897,13 +897,13 @@ NullifyCallbackTestCase::NullifyCallbackTestCase () {} void -NullifyCallbackTestCase::DoSetup (void) +NullifyCallbackTestCase::DoSetup () { m_test1 = false; } void -NullifyCallbackTestCase::DoRun (void) +NullifyCallbackTestCase::DoRun () { // // Make sure we can declare and make a Callback pointing to a member @@ -936,13 +936,13 @@ public: /** * Callback 1 target function. */ - void Target1 (void) + void Target1 () { m_test1 = true; } private: - virtual void DoRun (void); + virtual void DoRun (); bool m_test1; //!< true if Target1 has been called, false otherwise. }; @@ -951,7 +951,7 @@ private: * Test function - does nothing. * @{ */ -void TestFZero (void) {}; +void TestFZero () {}; void TestFOne (int) {}; void TestFTwo (int, int) {}; void TestFThree (int, int, int) {}; @@ -977,20 +977,20 @@ class CallbackTestParent { public: /// A public function. - void PublicParent (void) + void PublicParent () {} protected: /// A protected function. - void ProtectedParent (void) + void ProtectedParent () {} /// A static protected function. - static void StaticProtectedParent (void) + static void StaticProtectedParent () {} private: /// A private function. - void PrivateParent (void) + void PrivateParent () {} }; @@ -1007,14 +1007,14 @@ public: * Test function - does nothing. * @{ */ - void TestZero (void) {}; + void TestZero () {}; void TestOne (int) {}; void TestTwo (int, int) {}; void TestThree (int, int, int) {}; void TestFour (int, int, int, int) {}; void TestFive (int, int, int, int, int) {}; void TestSix (int, int, int, int, int, int) {}; - void TestCZero (void) const {}; + void TestCZero () const {}; void TestCOne (int) const {}; void TestCTwo (int, int) const {}; void TestCThree (int, int, int) const {}; @@ -1027,7 +1027,7 @@ public: * Tries to make a callback to public and protected functions of a class. * Private are not tested because, as expected, the compilation fails. */ - void CheckParentalRights (void) + void CheckParentalRights () { MakeCallback (&CallbackTestParent::StaticProtectedParent); MakeCallback (&CallbackTestParent::PublicParent, this); @@ -1048,7 +1048,7 @@ MakeCallbackTemplatesTestCase::MakeCallbackTemplatesTestCase () {} void -MakeCallbackTemplatesTestCase::DoRun (void) +MakeCallbackTemplatesTestCase::DoRun () { CallbackTestClass that; diff --git a/src/core/test/command-line-test-suite.cc b/src/core/test/command-line-test-suite.cc index f1d17281f..437d06a71 100644 --- a/src/core/test/command-line-test-suite.cc +++ b/src/core/test/command-line-test-suite.cc @@ -131,7 +131,7 @@ public: private: /** Run the test */ - virtual void DoRun (void); + virtual void DoRun (); }; @@ -140,7 +140,7 @@ CommandLineBooleanTestCase::CommandLineBooleanTestCase () {} void -CommandLineBooleanTestCase::DoRun (void) +CommandLineBooleanTestCase::DoRun () { CommandLine cmd; bool myBool = true; @@ -183,7 +183,7 @@ public: private: /** Run the test */ - virtual void DoRun (void); + virtual void DoRun (); }; @@ -192,7 +192,7 @@ CommandLineUint8tTestCase::CommandLineUint8tTestCase () {} void -CommandLineUint8tTestCase::DoRun (void) +CommandLineUint8tTestCase::DoRun () { CommandLine cmd; uint8_t myUint8 = 10; @@ -218,7 +218,7 @@ public: private: /** Run the test */ - virtual void DoRun (void); + virtual void DoRun (); }; @@ -227,7 +227,7 @@ CommandLineIntTestCase::CommandLineIntTestCase () {} void -CommandLineIntTestCase::DoRun (void) +CommandLineIntTestCase::DoRun () { CommandLine cmd; bool myBool = true; @@ -260,7 +260,7 @@ public: private: /** Run the test */ - virtual void DoRun (void); + virtual void DoRun (); }; @@ -269,7 +269,7 @@ CommandLineUnsignedIntTestCase::CommandLineUnsignedIntTestCase () {} void -CommandLineUnsignedIntTestCase::DoRun (void) +CommandLineUnsignedIntTestCase::DoRun () { CommandLine cmd; bool myBool = true; @@ -299,7 +299,7 @@ public: private: /** Run the test */ - virtual void DoRun (void); + virtual void DoRun (); }; @@ -308,7 +308,7 @@ CommandLineStringTestCase::CommandLineStringTestCase () {} void -CommandLineStringTestCase::DoRun (void) +CommandLineStringTestCase::DoRun () { CommandLine cmd; uint32_t myUint32 = 10; @@ -338,7 +338,7 @@ public: private: /** Run the test */ - virtual void DoRun (void); + virtual void DoRun (); }; @@ -347,7 +347,7 @@ CommandLineOrderTestCase::CommandLineOrderTestCase () {} void -CommandLineOrderTestCase::DoRun (void) +CommandLineOrderTestCase::DoRun () { CommandLine cmd; uint32_t myUint32 = 0; @@ -374,7 +374,7 @@ public: private: /** Run the test */ - virtual void DoRun (void); + virtual void DoRun (); }; @@ -383,7 +383,7 @@ CommandLineInvalidTestCase::CommandLineInvalidTestCase () {} void -CommandLineInvalidTestCase::DoRun (void) +CommandLineInvalidTestCase::DoRun () { CommandLine cmd; uint32_t myUint32 = 0; @@ -410,7 +410,7 @@ public: private: /** Run the test */ - virtual void DoRun (void); + virtual void DoRun (); }; @@ -419,7 +419,7 @@ CommandLineNonOptionTestCase::CommandLineNonOptionTestCase () {} void -CommandLineNonOptionTestCase::DoRun (void) +CommandLineNonOptionTestCase::DoRun () { CommandLine cmd; bool myBool = false; diff --git a/src/core/test/config-test-suite.cc b/src/core/test/config-test-suite.cc index 78d01ca69..678056ddf 100644 --- a/src/core/test/config-test-suite.cc +++ b/src/core/test/config-test-suite.cc @@ -63,7 +63,7 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** * Add node A function @@ -91,12 +91,12 @@ public: * Get node A function * \returns the value of node a */ - int8_t GetA (void) const; + int8_t GetA () const; /** * Get node b function * \returns the value of node b */ - int8_t GetB (void) const; + int8_t GetB () const; private: std::vector > m_nodesA; //!< NodesA attribute target. @@ -109,7 +109,7 @@ private: }; TypeId -ConfigTestObject::GetTypeId (void) +ConfigTestObject::GetTypeId () { static TypeId tid = TypeId ("ConfigTestObject") .SetParent () @@ -173,13 +173,13 @@ ConfigTestObject::AddNodeB (Ptr b) } int8_t -ConfigTestObject::GetA (void) const +ConfigTestObject::GetA () const { return m_a; } int8_t -ConfigTestObject::GetB (void) const +ConfigTestObject::GetB () const { return m_b; } @@ -195,17 +195,17 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ - DerivedConfigTestObject (void) + DerivedConfigTestObject () {} /** Destructor */ - virtual ~DerivedConfigTestObject (void) + virtual ~DerivedConfigTestObject () {} }; TypeId -DerivedConfigTestObject::GetTypeId (void) +DerivedConfigTestObject::GetTypeId () { static TypeId tid = TypeId ("DerivedConfigTestObject") .SetParent () @@ -224,12 +224,12 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ - BaseConfigObject (void) : m_x (15) + BaseConfigObject () : m_x (15) {} /** Destructor. */ - virtual ~BaseConfigObject (void) + virtual ~BaseConfigObject () {} private: @@ -237,7 +237,7 @@ private: }; TypeId -BaseConfigObject::GetTypeId (void) +BaseConfigObject::GetTypeId () { static TypeId tid = TypeId ("BaseConfigObject") .SetParent () @@ -260,17 +260,17 @@ public: * \brief Get the type ID. * \return the object TypeId */ - static TypeId GetTypeId (void); + static TypeId GetTypeId (); /** Constructor. */ - DerivedConfigObject (void) + DerivedConfigObject () {} /** Destructor. */ - virtual ~DerivedConfigObject (void) + virtual ~DerivedConfigObject () {} }; TypeId -DerivedConfigObject::GetTypeId (void) +DerivedConfigObject::GetTypeId () { static TypeId tid = TypeId ("DerivedConfigObject") .SetParent () @@ -293,7 +293,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); }; RootNamespaceConfigTestCase::RootNamespaceConfigTestCase () @@ -301,7 +301,7 @@ RootNamespaceConfigTestCase::RootNamespaceConfigTestCase () {} void -RootNamespaceConfigTestCase::DoRun (void) +RootNamespaceConfigTestCase::DoRun () { IntegerValue iv; // @@ -354,7 +354,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); }; UnderRootNamespaceConfigTestCase::UnderRootNamespaceConfigTestCase () @@ -362,7 +362,7 @@ UnderRootNamespaceConfigTestCase::UnderRootNamespaceConfigTestCase () {} void -UnderRootNamespaceConfigTestCase::DoRun (void) +UnderRootNamespaceConfigTestCase::DoRun () { IntegerValue iv; // @@ -466,7 +466,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); }; ObjectVectorConfigTestCase::ObjectVectorConfigTestCase () @@ -474,7 +474,7 @@ ObjectVectorConfigTestCase::ObjectVectorConfigTestCase () {} void -ObjectVectorConfigTestCase::DoRun (void) +ObjectVectorConfigTestCase::DoRun () { IntegerValue iv; @@ -644,7 +644,7 @@ public: } private: - virtual void DoRun (void); + virtual void DoRun (); int16_t m_newValue; //!< Flag to detect tracing result. std::string m_path; //!< The context path. @@ -655,7 +655,7 @@ ObjectVectorTraceConfigTestCase::ObjectVectorTraceConfigTestCase () {} void -ObjectVectorTraceConfigTestCase::DoRun (void) +ObjectVectorTraceConfigTestCase::DoRun () { IntegerValue iv; @@ -795,7 +795,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); }; @@ -804,7 +804,7 @@ SearchAttributesOfParentObjectsTestCase::SearchAttributesOfParentObjectsTestCase {} void -SearchAttributesOfParentObjectsTestCase::DoRun (void) +SearchAttributesOfParentObjectsTestCase::DoRun () { IntegerValue iv; // diff --git a/src/core/test/event-garbage-collector-test-suite.cc b/src/core/test/event-garbage-collector-test-suite.cc index ed37815fe..9b2b89c00 100644 --- a/src/core/test/event-garbage-collector-test-suite.cc +++ b/src/core/test/event-garbage-collector-test-suite.cc @@ -57,7 +57,7 @@ public: EventGarbageCollectorTestCase (); /** Destructor. */ virtual ~EventGarbageCollectorTestCase (); - virtual void DoRun (void); + virtual void DoRun (); }; EventGarbageCollectorTestCase::EventGarbageCollectorTestCase () @@ -79,7 +79,7 @@ EventGarbageCollectorTestCase::EventGarbageCollectorCallback () } } -void EventGarbageCollectorTestCase::DoRun (void) +void EventGarbageCollectorTestCase::DoRun () { m_events = new EventGarbageCollector (); diff --git a/src/core/test/examples-as-tests-test-suite.cc b/src/core/test/examples-as-tests-test-suite.cc index db753a74e..ed32f2d16 100644 --- a/src/core/test/examples-as-tests-test-suite.cc +++ b/src/core/test/examples-as-tests-test-suite.cc @@ -66,7 +66,7 @@ public: * * \returns The string of post-processing commands. */ - virtual std::string GetPostProcessingCommand (void) const; + virtual std::string GetPostProcessingCommand () const; }; CommandLineExampleTestCase::CommandLineExampleTestCase () @@ -79,7 +79,7 @@ CommandLineExampleTestCase::~CommandLineExampleTestCase () {} std::string -CommandLineExampleTestCase::GetPostProcessingCommand (void) const +CommandLineExampleTestCase::GetPostProcessingCommand () const { //Delete the line that starts with Program Version: return std::string(R"__(| sed -e "/^Program Version:.*$/d")__"); diff --git a/src/core/test/global-value-test-suite.cc b/src/core/test/global-value-test-suite.cc index 755a37b83..66b46921b 100644 --- a/src/core/test/global-value-test-suite.cc +++ b/src/core/test/global-value-test-suite.cc @@ -53,7 +53,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); }; GlobalValueTestCase::GlobalValueTestCase () @@ -61,7 +61,7 @@ GlobalValueTestCase::GlobalValueTestCase () {} void -GlobalValueTestCase::DoRun (void) +GlobalValueTestCase::DoRun () { // // Typically these are static globals but we can make one on the stack to diff --git a/src/core/test/hash-test-suite.cc b/src/core/test/hash-test-suite.cc index 8e9a24cf5..f7872e258 100644 --- a/src/core/test/hash-test-suite.cc +++ b/src/core/test/hash-test-suite.cc @@ -85,7 +85,7 @@ private: * \param [in] hash the hash value */ void Check ( const std::string hashName, const int bits, const uint64_t hash); - virtual void DoRun (void); + virtual void DoRun (); }; // class HashTestCase @@ -143,7 +143,7 @@ HashTestCase::Check ( std::string hashName, int bits, uint64_t hash) } void -HashTestCase::DoRun (void) +HashTestCase::DoRun () {} @@ -160,7 +160,7 @@ public: virtual ~DefaultHashTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; DefaultHashTestCase::DefaultHashTestCase () @@ -171,7 +171,7 @@ DefaultHashTestCase::~DefaultHashTestCase () {} void -DefaultHashTestCase::DoRun (void) +DefaultHashTestCase::DoRun () { std::cout << GetName () << "checking with key: \"" << key << "\"" << std::endl; @@ -196,7 +196,7 @@ public: virtual ~Fnv1aTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; Fnv1aTestCase::Fnv1aTestCase () @@ -207,7 +207,7 @@ Fnv1aTestCase::~Fnv1aTestCase () {} void -Fnv1aTestCase::DoRun (void) +Fnv1aTestCase::DoRun () { Hasher hasher = Hasher ( Create () ); hash32Reference = 0xa3fc0d6d; // Fnv1a(key) @@ -231,7 +231,7 @@ public: virtual ~Murmur3TestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; Murmur3TestCase::Murmur3TestCase () @@ -242,7 +242,7 @@ Murmur3TestCase::~Murmur3TestCase () {} void -Murmur3TestCase::DoRun (void) +Murmur3TestCase::DoRun () { Hasher hasher = Hasher ( Create () ); hash32Reference = 0x463d70e2; // Murmur3(key) @@ -319,7 +319,7 @@ public: virtual ~Hash32FunctionPtrTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; Hash32FunctionPtrTestCase::Hash32FunctionPtrTestCase () @@ -330,7 +330,7 @@ Hash32FunctionPtrTestCase::~Hash32FunctionPtrTestCase () {} void -Hash32FunctionPtrTestCase::DoRun (void) +Hash32FunctionPtrTestCase::DoRun () { Hasher hasher = Hasher ( Create (&gnu_sum32) ); hash32Reference = 0x41264126; // Hash32FunctionPtr(key) @@ -350,7 +350,7 @@ public: virtual ~Hash64FunctionPtrTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; Hash64FunctionPtrTestCase::Hash64FunctionPtrTestCase () @@ -361,7 +361,7 @@ Hash64FunctionPtrTestCase::~Hash64FunctionPtrTestCase () {} void -Hash64FunctionPtrTestCase::DoRun (void) +Hash64FunctionPtrTestCase::DoRun () { Hasher hasher = Hasher ( Create (&gnu_sum64) ); hash64Reference = 0x4126412641264126ULL; // Hash64FunctionPtr(key) @@ -381,7 +381,7 @@ public: virtual ~IncrementalTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); /** * Complute the hash test function * \param name the hash name @@ -413,7 +413,7 @@ IncrementalTestCase::DoHash (const std::string name, Hasher hasher) } void -IncrementalTestCase::DoRun (void) +IncrementalTestCase::DoRun () { key1 = "The quick brown "; key2 = "Incremental."; diff --git a/src/core/test/int64x64-test-suite.cc b/src/core/test/int64x64-test-suite.cc index 745fac670..69fcee546 100644 --- a/src/core/test/int64x64-test-suite.cc +++ b/src/core/test/int64x64-test-suite.cc @@ -120,7 +120,7 @@ class Int64x64HiLoTestCase : public TestCase { public: Int64x64HiLoTestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the high and low parts for correctness. * \param hi The high part of the int64x64_t. @@ -163,7 +163,7 @@ Int64x64HiLoTestCase::Check (const int64_t hi, const uint64_t lo) } void -Int64x64HiLoTestCase::DoRun (void) +Int64x64HiLoTestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " Check: " << GetName () @@ -198,8 +198,8 @@ Int64x64HiLoTestCase::DoRun (void) class Int64x64IntRoundTestCase : public TestCase { public: - Int64x64IntRoundTestCase (void); - virtual void DoRun (void); + Int64x64IntRoundTestCase (); + virtual void DoRun (); /** * Check the int64x64 value for correctness. * \param value The int64x64_t value. @@ -211,7 +211,7 @@ public: const int64_t expectRnd); }; -Int64x64IntRoundTestCase::Int64x64IntRoundTestCase (void) +Int64x64IntRoundTestCase::Int64x64IntRoundTestCase () : TestCase ("Check GetInt and Round") {} @@ -239,7 +239,7 @@ Int64x64IntRoundTestCase::Check (const int64x64_t value, } void -Int64x64IntRoundTestCase::DoRun (void) +Int64x64IntRoundTestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " Check: " << GetName () @@ -272,7 +272,7 @@ class Int64x64InputTestCase : public TestCase { public: Int64x64InputTestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the iont64x64 for correctness. * \param str String representation of a number. @@ -319,7 +319,7 @@ Int64x64InputTestCase::Check (const std::string & str, << str << "\""); } void -Int64x64InputTestCase::DoRun (void) +Int64x64InputTestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " Input: " << GetName () @@ -360,7 +360,7 @@ class Int64x64InputOutputTestCase : public TestCase { public: Int64x64InputOutputTestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the iont64x64 for correctness. * \param str String representation of a number. @@ -418,7 +418,7 @@ Int64x64InputOutputTestCase::Check (const std::string & str, } void -Int64x64InputOutputTestCase::DoRun (void) +Int64x64InputOutputTestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " InputOutput: " << GetName () @@ -451,7 +451,7 @@ class Int64x64ArithmeticTestCase : public TestCase { public: Int64x64ArithmeticTestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the int64x64 for correctness. * \param test The test number. @@ -486,7 +486,7 @@ Int64x64ArithmeticTestCase::Check (const int test, } void -Int64x64ArithmeticTestCase::DoRun (void) +Int64x64ArithmeticTestCase::DoRun () { const int64x64_t tol1 (0, 1); const int64x64_t zero (0, 0); @@ -600,7 +600,7 @@ class Int64x64Bug455TestCase : public TestCase { public: Int64x64Bug455TestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the int64x64 for correctness. * \param result The actual value. @@ -631,7 +631,7 @@ Int64x64Bug455TestCase::Check (const double result, const double expect, } void -Int64x64Bug455TestCase::DoRun (void) +Int64x64Bug455TestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " Bug 455: " << GetName () @@ -671,7 +671,7 @@ class Int64x64Bug863TestCase : public TestCase { public: Int64x64Bug863TestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the int64x64 for correctness. * \param result The actual value. @@ -702,7 +702,7 @@ Int64x64Bug863TestCase::Check (const double result, const double expect, } void -Int64x64Bug863TestCase::DoRun (void) +Int64x64Bug863TestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " Bug 863: " << GetName () @@ -743,7 +743,7 @@ class Int64x64Bug1786TestCase : public TestCase { public: Int64x64Bug1786TestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the int64x64 for correctness. * \param low The actual low value. @@ -797,7 +797,7 @@ Int64x64Bug1786TestCase::Check (const uint64_t low, } } void -Int64x64Bug1786TestCase::DoRun (void) +Int64x64Bug1786TestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " But 1786: " << GetName () @@ -891,7 +891,7 @@ class Int64x64CompareTestCase : public TestCase { public: Int64x64CompareTestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the int64x64 for correctness. @@ -920,7 +920,7 @@ Int64x64CompareTestCase::Check (const bool result, const bool expect, } void -Int64x64CompareTestCase::DoRun (void) +Int64x64CompareTestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " Compare: " << GetName () @@ -1009,7 +1009,7 @@ class Int64x64InvertTestCase : public TestCase { public: Int64x64InvertTestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the int64x64 for correctness. * \param factor The factor used to invert the number. @@ -1094,7 +1094,7 @@ Int64x64InvertTestCase::Check (const int64_t factor) } void -Int64x64InvertTestCase::DoRun (void) +Int64x64InvertTestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " Invert: " << GetName () @@ -1134,7 +1134,7 @@ class Int64x64DoubleTestCase : public TestCase { public: Int64x64DoubleTestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Check the int64x64 for correctness. @@ -1506,7 +1506,7 @@ Int64x64DoubleTestCase::Check (const int64_t intPart) } void -Int64x64DoubleTestCase::DoRun (void) +Int64x64DoubleTestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " Double: " << GetName () @@ -1550,7 +1550,7 @@ class Int64x64ImplTestCase : public TestCase { public: Int64x64ImplTestCase (); - virtual void DoRun (void); + virtual void DoRun (); }; Int64x64ImplTestCase::Int64x64ImplTestCase () @@ -1558,7 +1558,7 @@ Int64x64ImplTestCase::Int64x64ImplTestCase () {} void -Int64x64ImplTestCase::DoRun (void) +Int64x64ImplTestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " Impl: " << GetName () diff --git a/src/core/test/many-uniform-random-variables-one-get-value-call-test-suite.cc b/src/core/test/many-uniform-random-variables-one-get-value-call-test-suite.cc index c9becc8e7..254ad2fec 100644 --- a/src/core/test/many-uniform-random-variables-one-get-value-call-test-suite.cc +++ b/src/core/test/many-uniform-random-variables-one-get-value-call-test-suite.cc @@ -51,7 +51,7 @@ public: virtual ~ManyUniformRandomVariablesOneGetValueCallTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; ManyUniformRandomVariablesOneGetValueCallTestCase::ManyUniformRandomVariablesOneGetValueCallTestCase () @@ -62,7 +62,7 @@ ManyUniformRandomVariablesOneGetValueCallTestCase::~ManyUniformRandomVariablesOn {} void -ManyUniformRandomVariablesOneGetValueCallTestCase::DoRun (void) +ManyUniformRandomVariablesOneGetValueCallTestCase::DoRun () { const double min = 0.0; const double max = 10.0; diff --git a/src/core/test/names-test-suite.cc b/src/core/test/names-test-suite.cc index f35e88e34..ca910601c 100644 --- a/src/core/test/names-test-suite.cc +++ b/src/core/test/names-test-suite.cc @@ -47,7 +47,7 @@ public: * Register this type. * \return The TypeId. */ - static TypeId GetTypeId (void) + static TypeId GetTypeId () { static TypeId tid = TypeId ("TestObject") .SetParent () @@ -72,7 +72,7 @@ public: * Register this type. * \return The TypeId. */ - static TypeId GetTypeId (void) + static TypeId GetTypeId () { static TypeId tid = TypeId ("AlternateTestObject") .SetParent () @@ -107,8 +107,8 @@ public: virtual ~BasicAddTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; BasicAddTestCase::BasicAddTestCase () @@ -119,13 +119,13 @@ BasicAddTestCase::~BasicAddTestCase () {} void -BasicAddTestCase::DoTeardown (void) +BasicAddTestCase::DoTeardown () { Names::Clear (); } void -BasicAddTestCase::DoRun (void) +BasicAddTestCase::DoRun () { std::string found; @@ -172,8 +172,8 @@ public: virtual ~StringContextAddTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; StringContextAddTestCase::StringContextAddTestCase () @@ -185,13 +185,13 @@ StringContextAddTestCase::~StringContextAddTestCase () {} void -StringContextAddTestCase::DoTeardown (void) +StringContextAddTestCase::DoTeardown () { Names::Clear (); } void -StringContextAddTestCase::DoRun (void) +StringContextAddTestCase::DoRun () { std::string found; @@ -237,8 +237,8 @@ public: virtual ~FullyQualifiedAddTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; FullyQualifiedAddTestCase::FullyQualifiedAddTestCase () @@ -250,13 +250,13 @@ FullyQualifiedAddTestCase::~FullyQualifiedAddTestCase () {} void -FullyQualifiedAddTestCase::DoTeardown (void) +FullyQualifiedAddTestCase::DoTeardown () { Names::Clear (); } void -FullyQualifiedAddTestCase::DoRun (void) +FullyQualifiedAddTestCase::DoRun () { std::string found; @@ -306,8 +306,8 @@ public: virtual ~RelativeAddTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; RelativeAddTestCase::RelativeAddTestCase () @@ -319,13 +319,13 @@ RelativeAddTestCase::~RelativeAddTestCase () {} void -RelativeAddTestCase::DoTeardown (void) +RelativeAddTestCase::DoTeardown () { Names::Clear (); } void -RelativeAddTestCase::DoRun (void) +RelativeAddTestCase::DoRun () { std::string found; @@ -372,8 +372,8 @@ public: virtual ~BasicRenameTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; BasicRenameTestCase::BasicRenameTestCase () @@ -384,13 +384,13 @@ BasicRenameTestCase::~BasicRenameTestCase () {} void -BasicRenameTestCase::DoTeardown (void) +BasicRenameTestCase::DoTeardown () { Names::Clear (); } void -BasicRenameTestCase::DoRun (void) +BasicRenameTestCase::DoRun () { std::string found; @@ -434,8 +434,8 @@ public: virtual ~StringContextRenameTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; StringContextRenameTestCase::StringContextRenameTestCase () @@ -446,13 +446,13 @@ StringContextRenameTestCase::~StringContextRenameTestCase () {} void -StringContextRenameTestCase::DoTeardown (void) +StringContextRenameTestCase::DoTeardown () { Names::Clear (); } void -StringContextRenameTestCase::DoRun (void) +StringContextRenameTestCase::DoRun () { std::string found; @@ -496,8 +496,8 @@ public: virtual ~FullyQualifiedRenameTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; FullyQualifiedRenameTestCase::FullyQualifiedRenameTestCase () @@ -508,13 +508,13 @@ FullyQualifiedRenameTestCase::~FullyQualifiedRenameTestCase () {} void -FullyQualifiedRenameTestCase::DoTeardown (void) +FullyQualifiedRenameTestCase::DoTeardown () { Names::Clear (); } void -FullyQualifiedRenameTestCase::DoRun (void) +FullyQualifiedRenameTestCase::DoRun () { std::string found; @@ -558,8 +558,8 @@ public: virtual ~RelativeRenameTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; RelativeRenameTestCase::RelativeRenameTestCase () @@ -570,13 +570,13 @@ RelativeRenameTestCase::~RelativeRenameTestCase () {} void -RelativeRenameTestCase::DoTeardown (void) +RelativeRenameTestCase::DoTeardown () { Names::Clear (); } void -RelativeRenameTestCase::DoRun (void) +RelativeRenameTestCase::DoRun () { std::string found; @@ -620,8 +620,8 @@ public: virtual ~FindPathTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; FindPathTestCase::FindPathTestCase () @@ -632,13 +632,13 @@ FindPathTestCase::~FindPathTestCase () {} void -FindPathTestCase::DoTeardown (void) +FindPathTestCase::DoTeardown () { Names::Clear (); } void -FindPathTestCase::DoRun (void) +FindPathTestCase::DoRun () { std::string found; @@ -675,8 +675,8 @@ public: virtual ~BasicFindTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; BasicFindTestCase::BasicFindTestCase () @@ -687,13 +687,13 @@ BasicFindTestCase::~BasicFindTestCase () {} void -BasicFindTestCase::DoTeardown (void) +BasicFindTestCase::DoTeardown () { Names::Clear (); } void -BasicFindTestCase::DoRun (void) +BasicFindTestCase::DoRun () { Ptr found; @@ -739,8 +739,8 @@ public: virtual ~StringContextFindTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; StringContextFindTestCase::StringContextFindTestCase () @@ -751,13 +751,13 @@ StringContextFindTestCase::~StringContextFindTestCase () {} void -StringContextFindTestCase::DoTeardown (void) +StringContextFindTestCase::DoTeardown () { Names::Clear (); } void -StringContextFindTestCase::DoRun (void) +StringContextFindTestCase::DoRun () { Ptr found; @@ -803,8 +803,8 @@ public: virtual ~FullyQualifiedFindTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; FullyQualifiedFindTestCase::FullyQualifiedFindTestCase () @@ -815,13 +815,13 @@ FullyQualifiedFindTestCase::~FullyQualifiedFindTestCase () {} void -FullyQualifiedFindTestCase::DoTeardown (void) +FullyQualifiedFindTestCase::DoTeardown () { Names::Clear (); } void -FullyQualifiedFindTestCase::DoRun (void) +FullyQualifiedFindTestCase::DoRun () { Ptr found; @@ -867,8 +867,8 @@ public: virtual ~RelativeFindTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; RelativeFindTestCase::RelativeFindTestCase () @@ -879,13 +879,13 @@ RelativeFindTestCase::~RelativeFindTestCase () {} void -RelativeFindTestCase::DoTeardown (void) +RelativeFindTestCase::DoTeardown () { Names::Clear (); } void -RelativeFindTestCase::DoRun (void) +RelativeFindTestCase::DoRun () { Ptr found; @@ -928,8 +928,8 @@ public: virtual ~AlternateFindTestCase (); private: - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); }; AlternateFindTestCase::AlternateFindTestCase () @@ -940,13 +940,13 @@ AlternateFindTestCase::~AlternateFindTestCase () {} void -AlternateFindTestCase::DoTeardown (void) +AlternateFindTestCase::DoTeardown () { Names::Clear (); } void -AlternateFindTestCase::DoRun (void) +AlternateFindTestCase::DoRun () { Ptr testObject = CreateObject (); Names::Add ("Test Object", testObject); diff --git a/src/core/test/object-test-suite.cc b/src/core/test/object-test-suite.cc index a89761aa1..179ee460d 100644 --- a/src/core/test/object-test-suite.cc +++ b/src/core/test/object-test-suite.cc @@ -50,7 +50,7 @@ public: * Register this type. * \return The TypeId. */ - static ns3::TypeId GetTypeId (void) + static ns3::TypeId GetTypeId () { static ns3::TypeId tid = ns3::TypeId ("ObjectTest:BaseA") .SetParent () @@ -75,7 +75,7 @@ public: * Register this type. * \return The TypeId. */ - static ns3::TypeId GetTypeId (void) + static ns3::TypeId GetTypeId () { static ns3::TypeId tid = ns3::TypeId ("ObjectTest:DerivedA") .SetParent () @@ -89,7 +89,7 @@ public: {} protected: - virtual void DoDispose (void) + virtual void DoDispose () { BaseA::DoDispose (); } @@ -106,7 +106,7 @@ public: * Register this type. * \return The TypeId. */ - static ns3::TypeId GetTypeId (void) + static ns3::TypeId GetTypeId () { static ns3::TypeId tid = ns3::TypeId ("ObjectTest:BaseB") .SetParent () @@ -131,7 +131,7 @@ public: * Register this type. * \return The TypeId. */ - static ns3::TypeId GetTypeId (void) + static ns3::TypeId GetTypeId () { static ns3::TypeId tid = ns3::TypeId ("ObjectTest:DerivedB") .SetParent () @@ -145,7 +145,7 @@ public: {} protected: - virtual void DoDispose (void) + virtual void DoDispose () { BaseB::DoDispose (); } @@ -176,7 +176,7 @@ public: virtual ~CreateObjectTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; CreateObjectTestCase::CreateObjectTestCase () @@ -187,7 +187,7 @@ CreateObjectTestCase::~CreateObjectTestCase () {} void -CreateObjectTestCase::DoRun (void) +CreateObjectTestCase::DoRun () { Ptr baseA = CreateObject (); NS_TEST_ASSERT_MSG_NE (baseA, nullptr, "Unable to CreateObject"); @@ -243,7 +243,7 @@ public: virtual ~AggregateObjectTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; AggregateObjectTestCase::AggregateObjectTestCase () @@ -254,7 +254,7 @@ AggregateObjectTestCase::~AggregateObjectTestCase () {} void -AggregateObjectTestCase::DoRun (void) +AggregateObjectTestCase::DoRun () { Ptr baseA = CreateObject (); NS_TEST_ASSERT_MSG_NE (baseA, nullptr, "Unable to CreateObject"); @@ -415,7 +415,7 @@ public: virtual ~ObjectFactoryTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; ObjectFactoryTestCase::ObjectFactoryTestCase () @@ -426,7 +426,7 @@ ObjectFactoryTestCase::~ObjectFactoryTestCase () {} void -ObjectFactoryTestCase::DoRun (void) +ObjectFactoryTestCase::DoRun () { ObjectFactory factory; diff --git a/src/core/test/one-uniform-random-variable-many-get-value-calls-test-suite.cc b/src/core/test/one-uniform-random-variable-many-get-value-calls-test-suite.cc index a5cab8bce..8f77612a3 100644 --- a/src/core/test/one-uniform-random-variable-many-get-value-calls-test-suite.cc +++ b/src/core/test/one-uniform-random-variable-many-get-value-calls-test-suite.cc @@ -50,7 +50,7 @@ public: virtual ~OneUniformRandomVariableManyGetValueCallsTestCase (); private: - virtual void DoRun (void); + virtual void DoRun (); }; OneUniformRandomVariableManyGetValueCallsTestCase::OneUniformRandomVariableManyGetValueCallsTestCase () @@ -61,7 +61,7 @@ OneUniformRandomVariableManyGetValueCallsTestCase::~OneUniformRandomVariableMany {} void -OneUniformRandomVariableManyGetValueCallsTestCase::DoRun (void) +OneUniformRandomVariableManyGetValueCallsTestCase::DoRun () { const double min = 0.0; const double max = 10.0; diff --git a/src/core/test/ptr-test-suite.cc b/src/core/test/ptr-test-suite.cc index fb678b749..8f264ac25 100644 --- a/src/core/test/ptr-test-suite.cc +++ b/src/core/test/ptr-test-suite.cc @@ -53,9 +53,9 @@ public: /** Destructor. */ virtual ~PtrTestBase (); /** Increment the reference count. */ - void Ref (void) const; + void Ref () const; /** Decrement the reference count, and delete if necessary. */ - void Unref (void) const; + void Unref () const; private: mutable uint32_t m_count; //!< The reference count. @@ -81,7 +81,7 @@ public: */ ~NoCount (); /** Noop function. */ - void Nothing (void) const; + void Nothing () const; private: PtrTestCase *m_test; //!< The object being tracked. @@ -98,10 +98,10 @@ public: /** Constructor. */ PtrTestCase (); /** Count the destruction of an object. */ - void DestroyNotify (void); + void DestroyNotify (); private: - virtual void DoRun (void); + virtual void DoRun (); /** * Test that \pname{p} is a valid object, by calling a member function. * \param [in] p The object pointer to test. @@ -120,12 +120,12 @@ PtrTestBase::PtrTestBase () PtrTestBase::~PtrTestBase () {} void -PtrTestBase::Ref (void) const +PtrTestBase::Ref () const { m_count++; } void -PtrTestBase::Unref (void) const +PtrTestBase::Unref () const { m_count--; if (m_count == 0) @@ -147,11 +147,11 @@ NoCount::Nothing () const -PtrTestCase::PtrTestCase (void) +PtrTestCase::PtrTestCase () : TestCase ("Sanity checking of Ptr<>") {} void -PtrTestCase::DestroyNotify (void) +PtrTestCase::DestroyNotify () { m_nDestroyed++; } @@ -169,7 +169,7 @@ PtrTestCase::CallTestConst (Ptr const p) void -PtrTestCase::DoRun (void) +PtrTestCase::DoRun () { m_nDestroyed = false; { diff --git a/src/core/test/sample-test-suite.cc b/src/core/test/sample-test-suite.cc index c0acb292d..8c51848e3 100644 --- a/src/core/test/sample-test-suite.cc +++ b/src/core/test/sample-test-suite.cc @@ -92,7 +92,7 @@ public: virtual ~SampleTestCase1 (); private: - virtual void DoRun (void); + virtual void DoRun (); }; /** Add some help text to this case to describe what it is intended to test. */ @@ -112,7 +112,7 @@ SampleTestCase1::~SampleTestCase1 () * TestCase must implement */ void -SampleTestCase1::DoRun (void) +SampleTestCase1::DoRun () { // A wide variety of test macros are available in src/core/test.h NS_TEST_ASSERT_MSG_EQ (true, true, "true doesn't equal true for some reason"); diff --git a/src/core/test/simulator-test-suite.cc b/src/core/test/simulator-test-suite.cc index d1c11ad7f..c053b845b 100644 --- a/src/core/test/simulator-test-suite.cc +++ b/src/core/test/simulator-test-suite.cc @@ -51,7 +51,7 @@ public: * \param schedulerFactory Scheduler factory. */ SimulatorEventsTestCase (ObjectFactory schedulerFactory); - virtual void DoRun (void); + virtual void DoRun (); /** * Test Event. * \param value Event parameter. @@ -66,17 +66,17 @@ public: /** * Test Event. */ - void Eventfoo0 (void); + void Eventfoo0 (); /** * Get the simulator time. * \return The actual time [ms]. */ - uint64_t NowUs (void); + uint64_t NowUs (); /** * Checks that the events has been detroyed. */ - void Destroy (void); + void Destroy (); /** * Checks that events are properly handled. * @{ @@ -99,7 +99,7 @@ SimulatorEventsTestCase::SimulatorEventsTestCase (ObjectFactory schedulerFactory m_schedulerFactory (schedulerFactory) {} uint64_t -SimulatorEventsTestCase::NowUs (void) +SimulatorEventsTestCase::NowUs () { uint64_t ns = Now ().GetNanoSeconds (); return ns / 1000; @@ -146,11 +146,11 @@ SimulatorEventsTestCase::EventD (int d) } void -SimulatorEventsTestCase::Eventfoo0 (void) +SimulatorEventsTestCase::Eventfoo0 () {} void -SimulatorEventsTestCase::Destroy (void) +SimulatorEventsTestCase::Destroy () { if (m_destroyId.IsExpired ()) { @@ -158,7 +158,7 @@ SimulatorEventsTestCase::Destroy (void) } } void -SimulatorEventsTestCase::DoRun (void) +SimulatorEventsTestCase::DoRun () { m_a = true; m_b = false; @@ -229,19 +229,19 @@ public: * * @{ */ - void Ref (void) const {}; - void Unref (void) const {}; + void Ref () const {}; + void Unref () const {}; /** @} */ private: - virtual void DoRun (void); + virtual void DoRun (); /** * Function used for scheduling. * * @{ */ - void bar0 (void) {}; + void bar0 () {}; void bar1 (int) {}; void bar2 (int, int) {}; void bar3 (int, int, int) {}; @@ -258,7 +258,7 @@ private: void cbaz4 (const int &, const int &, const int &, const int &) {}; void cbaz5 (const int &, const int &, const int &, const int &, const int &) {}; - void bar0c (void) const {}; + void bar0c () const {}; void bar1c (int) const {}; void bar2c (int, int) const {}; void bar3c (int, int, int) const {}; @@ -282,7 +282,7 @@ private: * * @{ */ -static void foo0 (void) +static void foo0 () {} static void foo1 (int) {} @@ -320,7 +320,7 @@ SimulatorTemplateTestCase::SimulatorTemplateTestCase () : TestCase ("Check that all templates are instantiated correctly. This is a compilation test, it cannot fail at runtime.") {} void -SimulatorTemplateTestCase::DoRun (void) +SimulatorTemplateTestCase::DoRun () { // Test schedule of const methods Simulator::Schedule (Seconds (0.0), &SimulatorTemplateTestCase::bar0c, this); diff --git a/src/core/test/threaded-test-suite.cc b/src/core/test/threaded-test-suite.cc index 5dfa74234..648deafef 100644 --- a/src/core/test/threaded-test-suite.cc +++ b/src/core/test/threaded-test-suite.cc @@ -97,7 +97,7 @@ public: /** * End the thread execution. */ - void End (void); + void End (); uint64_t m_a; //!< The value incremented when EventA is called. uint64_t m_b; //!< The value incremented when EventB is called. uint64_t m_c; //!< The value incremented when EventC is called. @@ -111,9 +111,9 @@ public: std::list m_threadlist; //!< Thread list. private: - virtual void DoSetup (void); - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoSetup (); + virtual void DoRun (); + virtual void DoTeardown (); }; ThreadedSimulatorEventsTestCase::ThreadedSimulatorEventsTestCase (ObjectFactory schedulerFactory, const std::string &simulatorType, unsigned int threads) @@ -127,7 +127,7 @@ ThreadedSimulatorEventsTestCase::ThreadedSimulatorEventsTestCase (ObjectFactory {} void -ThreadedSimulatorEventsTestCase::End (void) +ThreadedSimulatorEventsTestCase::End () { m_stop = true; for (auto& thread : m_threadlist) @@ -225,7 +225,7 @@ ThreadedSimulatorEventsTestCase::EventD (int d) } void -ThreadedSimulatorEventsTestCase::DoSetup (void) +ThreadedSimulatorEventsTestCase::DoSetup () { if (!m_simulatorType.empty ()) { @@ -240,14 +240,14 @@ ThreadedSimulatorEventsTestCase::DoSetup (void) m_d = 0; } void -ThreadedSimulatorEventsTestCase::DoTeardown (void) +ThreadedSimulatorEventsTestCase::DoTeardown () { m_threadlist.clear (); Config::SetGlobal ("SimulatorImplementationType", StringValue ("ns3::DefaultSimulatorImpl")); } void -ThreadedSimulatorEventsTestCase::DoRun (void) +ThreadedSimulatorEventsTestCase::DoRun () { m_stop = false; Simulator::SetScheduler (m_schedulerFactory); diff --git a/src/core/test/time-test-suite.cc b/src/core/test/time-test-suite.cc index 2a51dbfaf..861eb5996 100644 --- a/src/core/test/time-test-suite.cc +++ b/src/core/test/time-test-suite.cc @@ -48,22 +48,22 @@ private: /** * \brief setup function for TimeSimpleTestCase. */ - virtual void DoSetup (void); + virtual void DoSetup (); /** * \brief Runs the Simple Time test case. */ - virtual void DoRun (void); + virtual void DoRun (); /** * \brief Tests the Time Operations. */ - virtual void DoTimeOperations (void); + virtual void DoTimeOperations (); /** * \brief Does the tear down for TimeSimpleTestCase. */ - virtual void DoTeardown (void); + virtual void DoTeardown (); /** * Helper function to handle boilerplate code for multiplication tests @@ -117,10 +117,10 @@ TimeSimpleTestCase::TimeSimpleTestCase () {} void -TimeSimpleTestCase::DoSetup (void) +TimeSimpleTestCase::DoSetup () {} -void TimeSimpleTestCase::DoTimeOperations (void) +void TimeSimpleTestCase::DoTimeOperations () { // Test Multiplication constexpr long long oneSec = 1000000000; // conversion to default nanoseconds @@ -155,7 +155,7 @@ void TimeSimpleTestCase::DoTimeOperations (void) } void -TimeSimpleTestCase::DoRun (void) +TimeSimpleTestCase::DoRun () { NS_TEST_ASSERT_MSG_EQ_TOL (Years (1.0).GetYears (), 1.0, Years (1).GetYears (), "is 1 really 1 ?"); @@ -204,7 +204,7 @@ TimeSimpleTestCase::DoRun (void) } void -TimeSimpleTestCase::DoTeardown (void) +TimeSimpleTestCase::DoTeardown () {} template @@ -345,17 +345,17 @@ private: /** * \brief DoSetup for TimeWithSignTestCase. */ - virtual void DoSetup (void); + virtual void DoSetup (); /** * \brief DoRun for TimeWithSignTestCase. */ - virtual void DoRun (void); + virtual void DoRun (); /** * \brief DoTeardown for TimeWithSignTestCase. */ - virtual void DoTeardown (void); + virtual void DoTeardown (); }; TimeWithSignTestCase::TimeWithSignTestCase () @@ -363,11 +363,11 @@ TimeWithSignTestCase::TimeWithSignTestCase () {} void -TimeWithSignTestCase::DoSetup (void) +TimeWithSignTestCase::DoSetup () {} void -TimeWithSignTestCase::DoRun (void) +TimeWithSignTestCase::DoRun () { Time timePositive ("+1000.0"); Time timePositiveWithUnits ("+1000.0ms"); @@ -398,7 +398,7 @@ TimeWithSignTestCase::DoRun (void) void -TimeWithSignTestCase::DoTeardown (void) +TimeWithSignTestCase::DoTeardown () {} /** @@ -417,7 +417,7 @@ private: /** * \brief DoRun for TimeInputOutputTestCase. */ - virtual void DoRun (void); + virtual void DoRun (); /** * \brief Check roundtrip from/to string. * \param str Time input check. @@ -478,7 +478,7 @@ TimeInputOutputTestCase::CheckAs (const Time t, const std::string expect) } void -TimeInputOutputTestCase::DoRun (void) +TimeInputOutputTestCase::DoRun () { std::cout << std::endl; std::cout << GetParent ()->GetName () << " InputOutput: " << GetName () diff --git a/src/core/test/timer-test-suite.cc b/src/core/test/timer-test-suite.cc index cae42c50c..91cecda88 100644 --- a/src/core/test/timer-test-suite.cc +++ b/src/core/test/timer-test-suite.cc @@ -67,14 +67,14 @@ class TimerStateTestCase : public TestCase { public: TimerStateTestCase (); - virtual void DoRun (void); + virtual void DoRun (); }; TimerStateTestCase::TimerStateTestCase () : TestCase ("Check correct state transitions") {} void -TimerStateTestCase::DoRun (void) +TimerStateTestCase::DoRun () { Timer timer = Timer (Timer::CANCEL_ON_DESTROY); @@ -116,8 +116,8 @@ class TimerTemplateTestCase : public TestCase { public: TimerTemplateTestCase (); - virtual void DoRun (void); - virtual void DoTeardown (void); + virtual void DoRun (); + virtual void DoTeardown (); /// Member function with one int parameter. void bazi (int) {}; @@ -146,7 +146,7 @@ TimerTemplateTestCase::TimerTemplateTestCase () {} void -TimerTemplateTestCase::DoRun (void) +TimerTemplateTestCase::DoRun () { Timer timer = Timer (Timer::CANCEL_ON_DESTROY); @@ -211,7 +211,7 @@ TimerTemplateTestCase::DoRun (void) } void -TimerTemplateTestCase::DoTeardown (void) +TimerTemplateTestCase::DoTeardown () { Simulator::Run (); Simulator::Destroy (); diff --git a/src/core/test/traced-callback-test-suite.cc b/src/core/test/traced-callback-test-suite.cc index 9a2855e2b..3451a208d 100644 --- a/src/core/test/traced-callback-test-suite.cc +++ b/src/core/test/traced-callback-test-suite.cc @@ -45,7 +45,7 @@ public: {} private: - virtual void DoRun (void); + virtual void DoRun (); /** * First callback. @@ -71,7 +71,7 @@ BasicTracedCallbackTestCase::CbOne ([[maybe_unused]] uint8_t a, [[maybe_unused]] void -BasicTracedCallbackTestCase::DoRun (void) +BasicTracedCallbackTestCase::DoRun () { // // Disconnecting callbacks from a traced callback is based on the ability to diff --git a/src/core/test/trickle-timer-test-suite.cc b/src/core/test/trickle-timer-test-suite.cc index 2101a486f..3dae91a83 100644 --- a/src/core/test/trickle-timer-test-suite.cc +++ b/src/core/test/trickle-timer-test-suite.cc @@ -53,17 +53,17 @@ class TrickleTimerTestCase : public TestCase public: /** Constructor. */ TrickleTimerTestCase (); - virtual void DoRun (void); + virtual void DoRun (); /** * Function to invoke when TrickleTimer expires. */ - void ExpireTimer (void); + void ExpireTimer (); std::vector