Skip to content
Permalink
Browse files

Initialize all fields of IPC::Channel in constructors

  • Loading branch information...
Amanieu authored and DolceTriade committed Dec 6, 2014
1 parent 1569cbd commit 08eab7ed448d862a5420585282853ffe781f585c
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/common/IPC.h
@@ -545,12 +545,13 @@ class Channel {
Channel()
: counter(0), handlingAsyncMsg(false) {}
Channel(Socket socket)
: socket(std::move(socket)), counter(0) {}
: socket(std::move(socket)), counter(0), handlingAsyncMsg(false) {}
Channel(Channel&& other)
: socket(std::move(other.socket)), handlingAsyncMsg(other.handlingAsyncMsg) {}
: socket(std::move(other.socket)), counter(0), handlingAsyncMsg(false) {}
Channel& operator=(Channel&& other)
{
std::swap(socket, other.socket);
counter = other.counter;
handlingAsyncMsg = other.handlingAsyncMsg;
return *this;
}

0 comments on commit 08eab7e

Please sign in to comment.
You can’t perform that action at this time.