client/Idle: use std::exchange()

This commit is contained in:
Max Kellermann 2018-01-20 00:21:26 +01:00
parent fe5d0ce827
commit 854424a758
1 changed files with 1 additions and 2 deletions

View File

@ -29,8 +29,7 @@ Client::IdleNotify() noexcept
assert(idle_waiting);
assert(idle_flags != 0);
unsigned flags = idle_flags;
idle_flags = 0;
unsigned flags = std::exchange(idle_flags, 0);
idle_waiting = false;
const char *const*idle_names = idle_get_names();