From 1e122fd7cd7b995058277a7b355cbbb933009fd7 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Sun, 21 Aug 2011 12:43:55 -0300 Subject: [PATCH] The class variable HeaderSizeInBytes was renamed to Ipv4HeaderSizeInBytes and made global only within file scope. --- src/ip/ipv4header.cpp | 8 ++++---- src/ip/ipv4header.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ip/ipv4header.cpp b/src/ip/ipv4header.cpp index 515932b..da8f271 100644 --- a/src/ip/ipv4header.cpp +++ b/src/ip/ipv4header.cpp @@ -15,7 +15,7 @@ using boost::asio::ip::address_v4; // Ipv4Header //----------------------------------------------------------------------------- -const int Ipv4Header::HeaderSizeInBytes = 20; +const int Ipv4HeaderSizeInBytes = 20; Ipv4Header::Ipv4Header() { @@ -106,14 +106,14 @@ istream &operator>>( { (void) is.read( reinterpret_cast ( header.Payload ), - Ipv4Header::HeaderSizeInBytes + Ipv4HeaderSizeInBytes ); if ( header.get_version() != 4 ) is.setstate( ios::failbit ); streamsize options_length = (streamsize) header.get_header_length() - - Ipv4Header::HeaderSizeInBytes; + Ipv4HeaderSizeInBytes; if ( options_length < 0 || 40 < options_length ) { is.setstate( ios::failbit ); @@ -122,7 +122,7 @@ istream &operator>>( { (void) is.read( reinterpret_cast ( header.Payload ) + - Ipv4Header::HeaderSizeInBytes, + Ipv4HeaderSizeInBytes, options_length ); } diff --git a/src/ip/ipv4header.h b/src/ip/ipv4header.h index c68979e..4f07b3e 100644 --- a/src/ip/ipv4header.h +++ b/src/ip/ipv4header.h @@ -79,7 +79,6 @@ private: uint16_t decode( int left_byte, int right_byte ) const; private: - const static int HeaderSizeInBytes; uint8_t Payload[ 60 ]; }; -- 1.7.1