Parcourir la source

[2404] Minor changes to make files conform to programming style

Stephen Morris il y a 12 ans
Parent
commit
d135a0e1f8
2 fichiers modifiés avec 16 ajouts et 16 suppressions
  1. 12 12
      src/lib/dhcp/duid.cc
  2. 4 4
      src/lib/dhcp/duid.h

+ 12 - 12
src/lib/dhcp/duid.cc

@@ -33,7 +33,7 @@ DUID::DUID(const std::vector<uint8_t>& duid) {
     }
 }
 
-DUID::DUID(const uint8_t * data, size_t len) {
+DUID::DUID(const uint8_t* data, size_t len) {
     if (len > MAX_DUID_LEN) {
         isc_throw(OutOfRange, "DUID too large");
     }
@@ -72,36 +72,36 @@ std::string DUID::toText() const {
     return (tmp.str());
 }
 
-bool DUID::operator == (const DUID& other) const {
+bool DUID::operator==(const DUID& other) const {
     return (this->duid_ == other.duid_);
 }
 
-bool DUID::operator != (const DUID& other) const {
+bool DUID::operator!=(const DUID& other) const {
     return (this->duid_ != other.duid_);
 }
 
-/// constructor based on vector<uint8_t>
+// Constructor based on vector<uint8_t>
 ClientId::ClientId(const std::vector<uint8_t>& clientid)
-    :DUID(clientid) {
+    : DUID(clientid) {
 }
 
-/// constructor based on C-style data
+// Constructor based on C-style data
 ClientId::ClientId(const uint8_t *clientid, size_t len)
-    :DUID(clientid, len) {
+    : DUID(clientid, len) {
 }
 
-/// @brief returns a copy of client-id data
+// Returns a copy of client-id data
 const std::vector<uint8_t> ClientId::getClientId() const {
     return (duid_);
 }
 
-// compares two client-ids
-bool ClientId::operator == (const ClientId& other) const {
+// Compares two client-ids
+bool ClientId::operator==(const ClientId& other) const {
     return (this->duid_ == other.duid_);
 }
 
-// compares two client-ids
-bool ClientId::operator != (const ClientId& other) const {
+// Compares two client-ids
+bool ClientId::operator!=(const ClientId& other) const {
     return (this->duid_ != other.duid_);
 }
 

+ 4 - 4
src/lib/dhcp/duid.h

@@ -49,7 +49,7 @@ class DUID {
     DUID(const std::vector<uint8_t>& duid);
 
     /// @brief creates a DUID
-    DUID(const uint8_t *duid, size_t len);
+    DUID(const uint8_t* duid, size_t len);
 
     /// @brief returns a const reference to the actual DUID value
     ///
@@ -90,17 +90,17 @@ class ClientId : DUID {
     ClientId(const std::vector<uint8_t>& clientid);
 
     /// constructor based on C-style data
-    ClientId(const uint8_t *clientid, size_t len);
+    ClientId(const uint8_t* clientid, size_t len);
 
     /// @brief returns reference to the client-id data
     ///
     const std::vector<uint8_t> getClientId() const;
 
     // compares two client-ids
-    bool operator == (const ClientId& other) const;
+    bool operator==(const ClientId& other) const;
 
     // compares two client-ids
-    bool operator != (const ClientId& other) const;
+    bool operator!=(const ClientId& other) const;
 };
 
 }; // end of isc::dhcp namespace