aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/dsound.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-12 18:02:12 -0700
committerChris Robinson <[email protected]>2023-05-12 18:02:12 -0700
commite7ea579ca5f3c0da6cfe80ec9a7295bca60198aa (patch)
tree43e7e7d3ac1cbdbfd3705986238853eec72c272e /alc/backends/dsound.cpp
parent72f02418e505a192c0cc7b27cd7b3aa28a7a03ec (diff)
Avoid using al::vector unnecessarily
Diffstat (limited to 'alc/backends/dsound.cpp')
-rw-r--r--alc/backends/dsound.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp
index ffcd8430..5fc8a1c7 100644
--- a/alc/backends/dsound.cpp
+++ b/alc/backends/dsound.cpp
@@ -46,6 +46,7 @@
#include "albit.h"
#include "alnumeric.h"
+#include "alspan.h"
#include "comptr.h"
#include "core/device.h"
#include "core/helpers.h"
@@ -130,10 +131,10 @@ struct DevMap {
{ }
};
-al::vector<DevMap> PlaybackDevices;
-al::vector<DevMap> CaptureDevices;
+std::vector<DevMap> PlaybackDevices;
+std::vector<DevMap> CaptureDevices;
-bool checkName(const al::vector<DevMap> &list, const std::string &name)
+bool checkName(const al::span<DevMap> list, const std::string &name)
{
auto match_name = [&name](const DevMap &entry) -> bool
{ return entry.name == name; };
@@ -145,7 +146,7 @@ BOOL CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHAR*, voi
if(!guid)
return TRUE;
- auto& devices = *static_cast<al::vector<DevMap>*>(data);
+ auto& devices = *static_cast<std::vector<DevMap>*>(data);
const std::string basename{DEVNAME_HEAD + wstr_to_utf8(desc)};
int count{1};