Commit fc5e5746 authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[master] Fix missing virtual dtors and cppcheck failures in

new code from merge of Trac 3008.
parent ee4bbde1
...@@ -199,7 +199,7 @@ NameChangeSender::sendNext() { ...@@ -199,7 +199,7 @@ NameChangeSender::sendNext() {
// If queue isn't empty, then get one from the front. Note we leave // If queue isn't empty, then get one from the front. Note we leave
// it on the front of the queue until we successfully send it. // it on the front of the queue until we successfully send it.
if (send_queue_.size()) { if (!send_queue_.empty()) {
ncr_to_send_ = send_queue_.front(); ncr_to_send_ = send_queue_.front();
// @todo start defense timer // @todo start defense timer
...@@ -262,7 +262,7 @@ NameChangeSender::invokeSendHandler(const NameChangeSender::Result result) { ...@@ -262,7 +262,7 @@ NameChangeSender::invokeSendHandler(const NameChangeSender::Result result) {
void void
NameChangeSender::skipNext() { NameChangeSender::skipNext() {
if (send_queue_.size()) { if (!send_queue_.empty()) {
// Discards the request at the front of the queue. // Discards the request at the front of the queue.
send_queue_.pop_front(); send_queue_.pop_front();
} }
......
...@@ -171,6 +171,9 @@ public: ...@@ -171,6 +171,9 @@ public:
/// @throw This method MUST NOT throw. /// @throw This method MUST NOT throw.
virtual void operator ()(const Result result, virtual void operator ()(const Result result,
NameChangeRequestPtr& ncr) = 0; NameChangeRequestPtr& ncr) = 0;
virtual ~RequestReceiveHandler() {
}
}; };
/// @brief Constructor /// @brief Constructor
...@@ -435,6 +438,9 @@ public: ...@@ -435,6 +438,9 @@ public:
/// @throw This method MUST NOT throw. /// @throw This method MUST NOT throw.
virtual void operator ()(const Result result, virtual void operator ()(const Result result,
NameChangeRequestPtr& ncr) = 0; NameChangeRequestPtr& ncr) = 0;
virtual ~RequestSendHandler(){
}
}; };
/// @brief Constructor /// @brief Constructor
......
...@@ -105,7 +105,7 @@ public: ...@@ -105,7 +105,7 @@ public:
} }
/// @brief Compares two D2Dhcids for inequality /// @brief Compares two D2Dhcids for inequality
bool operator!=(const D2Dhcid other) const { bool operator!=(const D2Dhcid& other) const {
return (this->bytes_ != other.bytes_); return (this->bytes_ != other.bytes_);
} }
......
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