Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: tempate <[email protected]>
  • Loading branch information
Tempate committed Nov 14, 2023
1 parent 076148d commit 3d5113d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions ddspipe_core/src/cpp/core/DdsPipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3d5113d

Please sign in to comment.