Browse Source

[trac998] Corrected some minor issues

Marked a getXxx() method as const, and added member initialization
to a constructor in a test.
Stephen Morris 14 years ago
parent
commit
67a88d3fd7
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/lib/acl/ip_check.h
  2. 1 1
      src/lib/acl/tests/ip_check_unittest.cc

+ 2 - 2
src/lib/acl/ip_check.h

@@ -274,7 +274,7 @@ public:
     }
     }
 
 
     /// \return Setting of inverse flag
     /// \return Setting of inverse flag
-    bool getInverse() {
+    bool getInverse() const {
         return (inverse_);
         return (inverse_);
     }
     }
     ///@}
     ///@}
@@ -470,7 +470,7 @@ public:
     }
     }
 
 
     /// \return Setting of inverse flag
     /// \return Setting of inverse flag
-    bool getInverse() {
+    bool getInverse() const {
         return (inverse_);
         return (inverse_);
     }
     }
     ///@}
     ///@}

+ 1 - 1
src/lib/acl/tests/ip_check_unittest.cc

@@ -28,7 +28,7 @@ struct GeneralAddress {
     uint32_t    v4addr;
     uint32_t    v4addr;
     uint8_t     v6addr[16];
     uint8_t     v6addr[16];
 
 
-    GeneralAddress()
+    GeneralAddress() : isv4(false), v4addr(0)
     {}
     {}
 
 
     // Convenience constructor for V4 address.  As it is not marked as
     // Convenience constructor for V4 address.  As it is not marked as