From 3d5113d331a4eb04dee97588375b2417782d5d54 Mon Sep 17 00:00:00 2001 From: tempate Date: Tue, 14 Nov 2023 14:58:56 +0100 Subject: [PATCH] Apply suggestions Signed-off-by: tempate --- ddspipe_core/src/cpp/core/DdsPipe.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ddspipe_core/src/cpp/core/DdsPipe.cpp b/ddspipe_core/src/cpp/core/DdsPipe.cpp index d6ff67f5..41894a41 100644 --- a/ddspipe_core/src/cpp/core/DdsPipe.cpp +++ b/ddspipe_core/src/cpp/core/DdsPipe.cpp @@ -355,16 +355,14 @@ void DdsPipe::updated_endpoint_nts_( bool DdsPipe::is_endpoint_relevant_( const Endpoint& endpoint) noexcept { - const auto discovery_trigger = configuration_.discovery_trigger; - - auto is_endpoint_type_relevant = [discovery_trigger](const Endpoint& endpoint) + auto is_endpoint_type_relevant = [&](const Endpoint& entity) { - switch (discovery_trigger) + switch (configuration_.discovery_trigger) { case DiscoveryTrigger::READER: - return endpoint.is_reader(); + return entity.is_reader(); case DiscoveryTrigger::WRITER: - return endpoint.is_writer(); + return entity.is_writer(); case DiscoveryTrigger::ANY: return true; case DiscoveryTrigger::NONE: