Commit d135a0e1 authored by Stephen Morris's avatar Stephen Morris

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

parent b7bce1d6
......@@ -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_);
}
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment