Skip to content

Add noexcept to lambdas#930

Merged
sbooth merged 2 commits into
mainfrom
noexcept-lambda
Jun 8, 2026
Merged

Add noexcept to lambdas#930
sbooth merged 2 commits into
mainfrom
noexcept-lambda

Conversation

@sbooth

@sbooth sbooth commented Jun 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 8, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes lambda exception specifications by adding explicit noexcept where appropriate and adjusting lambda syntax to the standard form required when specifying noexcept (i.e., adding () for empty parameter lists). This improves correctness/portability of the C++ code (especially around lambda declarators) and clarifies that certain callbacks/predicates are not expected to throw.

Changes:

  • Fix lambda declarator syntax in host_time.hpp by adding an explicit empty parameter list before noexcept.
  • Mark std::stop_callback lambdas as noexcept in AudioPlayer.mm.
  • Mark several internal predicate/helper lambdas as noexcept in AudioPlayer.mm.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Sources/CSFBAudioEngine/Player/host_time.hpp Makes the timebase initialization lambda use standard []() noexcept {} syntax.
Sources/CSFBAudioEngine/Player/AudioPlayer.mm Adds noexcept to several lambdas (stop callbacks and predicates) and updates syntax for empty-parameter lambdas accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sbooth sbooth merged commit 4134626 into main Jun 8, 2026
3 checks passed
@sbooth sbooth deleted the noexcept-lambda branch June 8, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants