aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/dsound.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-10-09 03:29:25 -0700
committerChris Robinson <[email protected]>2019-10-09 03:29:25 -0700
commitb687e952efa7407e323e8465df41e2e84b277b31 (patch)
treeaa2272b383366a2c37c9663e498ea1bc158a8984 /alc/backends/dsound.cpp
parenta7c12453600d4e9ae756b933770c6f42977a2663 (diff)
Make C callbacks noexcept
No telling what would happen if exceptions managed to get back into presumably C-based callers.
Diffstat (limited to 'alc/backends/dsound.cpp')
-rw-r--r--alc/backends/dsound.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp
index b74f2d3e..c04ba9e4 100644
--- a/alc/backends/dsound.cpp
+++ b/alc/backends/dsound.cpp
@@ -124,13 +124,12 @@ al::vector<DevMap> CaptureDevices;
bool checkName(const al::vector<DevMap> &list, const std::string &name)
{
- return std::find_if(list.cbegin(), list.cend(),
- [&name](const DevMap &entry) -> bool
- { return entry.name == name; }
- ) != list.cend();
+ auto match_name = [&name](const DevMap &entry) -> bool
+ { return entry.name == name; };
+ return std::find_if(list.cbegin(), list.cend(), match_name) != list.cend();
}
-BOOL CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHAR*, void *data)
+BOOL CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHAR*, void *data) noexcept
{
if(!guid)
return TRUE;