Attributes names according to the company's coding style.
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Thu, 24 Mar 2011 13:46:10 +0000 (14:46 +0100)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Thu, 24 Mar 2011 13:46:10 +0000 (14:46 +0100)
src/icmp/checksumcalculator.h

index 9b5b657..33f2158 100644 (file)
@@ -7,6 +7,9 @@
 // ChecksumCalculator
 //-----------------------------------------------------------------------------
 
+/**
+ * @brief Class that provides checksum calculation.
+ */
 template<typename Iterator>
 class ChecksumCalculator
 {
@@ -24,8 +27,8 @@ public:
     );
 
 private:
-    Iterator body_begin;
-    Iterator body_end;
+    Iterator BodyBegin;
+    Iterator BodyEnd;
 
 };
 
@@ -34,11 +37,11 @@ template<typename Iterator>
             Iterator body_begin,
             Iterator body_end
     ) :
-        body_begin(),
-        body_end()
+        BodyBegin(),
+        BodyEnd()
     {
-        this->body_begin = body_begin;
-        this->body_end = body_end;
+        this->BodyBegin = body_begin;
+        this->BodyEnd = body_end;
     }
 
 template<typename Iterator>
@@ -51,11 +54,11 @@ template<typename Iterator>
     {
         uint32_t sum = (type << 8) + code + identifier + sequence_number;
 
-        Iterator body_iter = body_begin;
-        while ( body_iter != body_end )
+        Iterator body_iter = BodyBegin;
+        while ( body_iter != BodyEnd )
         {
             sum += (static_cast<uint8_t> ( *body_iter++ ) << 8);
-            if ( body_iter != body_end )
+            if ( body_iter != BodyEnd )
                 sum += static_cast<uint8_t> ( *body_iter++ );
         }