Skip to content

Commit

Permalink
use as_const to tidy lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclarke committed Nov 6, 2023
1 parent c48768d commit a411421
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/StreamController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ void StreamController::initStreams(std::set<std::string> KnownTopicNames) {
return;
}
auto CheckStreamersPausedLambda =
[&StreamersPausedConst =
static_cast<const std::atomic<bool> &>(StreamersPaused)]() -> bool {
[&StreamersPausedConst = std::as_const(StreamersPaused)]() -> bool {
return StreamersPausedConst.load(std::memory_order_relaxed);
};
for (auto &CItem : TopicSrcMap) {
Expand Down

0 comments on commit a411421

Please sign in to comment.