mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 12:18:00 -05:00
scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts. Also avoids some potential problems when nesting braces inside it.
This commit is contained in:
@ -357,7 +357,9 @@ bool IsCubebSuitable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
SCOPE_EXIT({ cubeb_destroy(ctx); });
|
||||
SCOPE_EXIT {
|
||||
cubeb_destroy(ctx);
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
if (SUCCEEDED(com_init_result)) {
|
||||
|
@ -20,10 +20,10 @@
|
||||
namespace AudioCore::Sink {
|
||||
|
||||
void SinkStream::AppendBuffer(SinkBuffer& buffer, std::span<s16> samples) {
|
||||
SCOPE_EXIT({
|
||||
SCOPE_EXIT {
|
||||
queue.enqueue(buffer);
|
||||
++queued_buffers;
|
||||
});
|
||||
};
|
||||
|
||||
if (type == StreamType::In) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user