client: use C++11 initializers

This commit is contained in:
Max Kellermann 2017-08-11 09:21:29 +02:00
parent 33b4114534
commit 6de8303df8
2 changed files with 4 additions and 6 deletions

View File

@ -64,11 +64,11 @@ public:
const unsigned int num; /* client number */
/** is this client waiting for an "idle" response? */
bool idle_waiting;
bool idle_waiting = false;
/** idle flags pending on this client, to be sent as soon as
the client enters "idle" */
unsigned idle_flags;
unsigned idle_flags = 0;
/** idle flags that the client wants to receive */
unsigned idle_subscriptions;
@ -87,7 +87,7 @@ public:
* The number of subscriptions in #subscriptions. Used to
* limit the number of subscriptions.
*/
unsigned num_subscriptions;
unsigned num_subscriptions = 0;
/**
* A list of messages this client has received.

View File

@ -49,9 +49,7 @@ Client::Client(EventLoop &_loop, Partition &_partition,
partition(&_partition),
permission(getDefaultPermissions()),
uid(_uid),
num(_num),
idle_waiting(false), idle_flags(0),
num_subscriptions(0)
num(_num)
{
TimeoutMonitor::Schedule(client_timeout);
}