From 00ed836aa98d4d64a7bac7f84d29146efc653cd4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 20 Jan 2020 12:18:43 +0100 Subject: [PATCH] Instance: remove partitions loop from {Found,Lost}Neighbor() These are global events. --- src/Instance.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Instance.cxx b/src/Instance.cxx index 3f6317f96..4daf10d16 100644 --- a/src/Instance.cxx +++ b/src/Instance.cxx @@ -130,15 +130,13 @@ Instance::OnDatabaseSongRemoved(const char *uri) noexcept void Instance::FoundNeighbor(gcc_unused const NeighborInfo &info) noexcept { - for (auto &partition : partitions) - partition.EmitIdle(IDLE_NEIGHBOR); + EmitIdle(IDLE_NEIGHBOR); } void Instance::LostNeighbor(gcc_unused const NeighborInfo &info) noexcept { - for (auto &partition : partitions) - partition.EmitIdle(IDLE_NEIGHBOR); + EmitIdle(IDLE_NEIGHBOR); } #endif