From a41142181c5ab99828736cb43764d0c6b6b1b878 Mon Sep 17 00:00:00 2001 From: Matt Clarke Date: Mon, 6 Nov 2023 12:47:32 +0100 Subject: [PATCH] use as_const to tidy lambda --- src/StreamController.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/StreamController.cpp b/src/StreamController.cpp index 5a53747f6..2d7dc1655 100644 --- a/src/StreamController.cpp +++ b/src/StreamController.cpp @@ -144,8 +144,7 @@ void StreamController::initStreams(std::set KnownTopicNames) { return; } auto CheckStreamersPausedLambda = - [&StreamersPausedConst = - static_cast &>(StreamersPaused)]() -> bool { + [&StreamersPausedConst = std::as_const(StreamersPaused)]() -> bool { return StreamersPausedConst.load(std::memory_order_relaxed); }; for (auto &CItem : TopicSrcMap) {