From 4a65d7c6ce0580e508f094f3820b50768196bb69 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:20:06 +0100 Subject: [PATCH] DPL: get rid of warning --- Framework/Core/src/FairMQDeviceProxy.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Framework/Core/src/FairMQDeviceProxy.cxx b/Framework/Core/src/FairMQDeviceProxy.cxx index a83057e9578be..c25a58e47ef2d 100644 --- a/Framework/Core/src/FairMQDeviceProxy.cxx +++ b/Framework/Core/src/FairMQDeviceProxy.cxx @@ -320,10 +320,7 @@ void FairMQDeviceProxy::bind(std::vector const& outputs, std::vecto mInputRoutes.emplace_back(RouteState{channelIndex, false}); ri++; } - for (auto& route : mInputRoutes) { - assert(route.channel.value != -1); - assert(route.channel.value < mInputChannels.size()); - } + assert(std::all_of(mInputRoutes.begin(), mInputRoutes.end(), [s = mInputChannels.size()](RouteState const& route) { return route.channel.value != -1 && route.channel.value < s; })); LOGP(detail, "Total input channels found {}, total routes {}", mInputChannels.size(), mInputRoutes.size()); assert(mInputRoutes.size() == inputs.size()); }