Bug 2596 - EthernetTrailer::GetFcs should be const
EthernetTrailer::GetFcs should be const
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
pre-release
All All
: P3 minor
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-24 03:23 UTC by debug.ito
Modified: 2017-01-26 00:49 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description debug.ito 2016-12-24 03:23:35 UTC
This function doesn't have to be non-const at all. Being non-const compormises usability of this function.
Comment 1 Tom Henderson 2016-12-24 10:27:52 UTC
I agree, I will patch this if no other comments.

--- a/src/network/utils/ethernet-trailer.h	Thu Dec 22 23:20:55 2016 +0300
+++ b/src/network/utils/ethernet-trailer.h	Sat Dec 24 07:28:17 2016 -0800
@@ -67,7 +67,7 @@
   /**
    * \return the FCS contained in this trailer
    */
-  uint32_t GetFcs ();
+  uint32_t GetFcs () const;
Comment 2 Tom Henderson 2017-01-26 00:49:40 UTC
fixed in changeset bc8fbd146d50