Parcourir la source

[trac998] Corrected some minor issues

Marked a getXxx() method as const, and added member initialization
to a constructor in a test.
Stephen Morris il y a 14 ans
Parent
commit
67a88d3fd7
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  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
-    bool getInverse() {
+    bool getInverse() const {
         return (inverse_);
     }
     ///@}
@@ -470,7 +470,7 @@ public:
     }
 
     /// \return Setting of inverse flag
-    bool getInverse() {
+    bool getInverse() const {
         return (inverse_);
     }
     ///@}

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

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