The class variable HeaderSizeInBytes was renamed to Ipv4HeaderSizeInBytes and made...
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Sun, 21 Aug 2011 15:43:55 +0000 (12:43 -0300)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Sun, 21 Aug 2011 15:43:55 +0000 (12:43 -0300)
src/ip/ipv4header.cpp
src/ip/ipv4header.h

index 515932b..da8f271 100644 (file)
@@ -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<char*> ( 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<char*> ( header.Payload ) +
-                Ipv4Header::HeaderSizeInBytes,
+                Ipv4HeaderSizeInBytes,
                 options_length
         );
     }
index c68979e..4f07b3e 100644 (file)
@@ -79,7 +79,6 @@ private:
     uint16_t decode( int left_byte, int right_byte ) const;
 
 private:
-    const static int HeaderSizeInBytes;
     uint8_t Payload[ 60 ];
 
 };