From f70f126f762e05398520154103b91e5a16de0f03 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 3 Aug 2023 17:29:42 +0200 Subject: [PATCH] AlsaDeviceFinder: Replace BOOST_SCOPE_EXIT with QScopeGuard --- src/engine/alsadevicefinder.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engine/alsadevicefinder.cpp b/src/engine/alsadevicefinder.cpp index 5d39d3286..ae1bd0c40 100644 --- a/src/engine/alsadevicefinder.cpp +++ b/src/engine/alsadevicefinder.cpp @@ -22,9 +22,9 @@ #include #include #include -#include #include +#include #include @@ -60,8 +60,7 @@ EngineDeviceList AlsaDeviceFinder::ListDevices() { qLog(Error) << "Unable to open soundcard" << card << ":" << snd_strerror(result); continue; } - BOOST_SCOPE_EXIT(&handle) { snd_ctl_close(handle); } // clazy:exclude=rule-of-three NOLINT(google-explicit-constructor) - BOOST_SCOPE_EXIT_END + const QScopeGuard snd_ctl_handle_close = qScopeGuard([&handle]() { snd_ctl_close(handle); }); result = snd_ctl_card_info(handle, cardinfo); if (result < 0) {