summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-08-11 09:21:29 +0200
committerMax Kellermann <max@musicpd.org>2017-08-11 09:21:29 +0200
commit6de8303df81d096e94a2ddc2abf6ce729ccfd7c9 (patch)
treeebe5218243d3f1582cf5809fa0da8356b5efc9aa /src/client
parent33b41145341477a5a7d451174a2b5f5794a6176b (diff)
client: use C++11 initializers
Diffstat (limited to 'src/client')
-rw-r--r--src/client/Client.hxx6
-rw-r--r--src/client/ClientNew.cxx4
2 files changed, 4 insertions, 6 deletions
diff --git a/src/client/Client.hxx b/src/client/Client.hxx
index 6c895006c..b03e85629 100644
--- a/src/client/Client.hxx
+++ b/src/client/Client.hxx
@@ -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.
diff --git a/src/client/ClientNew.cxx b/src/client/ClientNew.cxx
index 12d302dc1..1dd430a0d 100644
--- a/src/client/ClientNew.cxx
+++ b/src/client/ClientNew.cxx
@@ -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);
}