aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/alsa.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-15 04:24:33 -0800
committerChris Robinson <[email protected]>2018-11-15 04:24:33 -0800
commit1971d0f5c6c94b250f4b3e29bdfa95c836f900bc (patch)
treeb3af8bbd22fe26ad4db683214911897fae767ae3 /Alc/backends/alsa.cpp
parentd4f64b9e29319f56f2ecab1291918a52ec8336f1 (diff)
Use std::string instead of al_string for enumerating
Diffstat (limited to 'Alc/backends/alsa.cpp')
-rw-r--r--Alc/backends/alsa.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/backends/alsa.cpp b/Alc/backends/alsa.cpp
index 15308632..5a389eab 100644
--- a/Alc/backends/alsa.cpp
+++ b/Alc/backends/alsa.cpp
@@ -1327,16 +1327,14 @@ static ALCboolean ALCalsaBackendFactory_querySupport(ALCalsaBackendFactory* UNUS
return ALC_FALSE;
}
-static void ALCalsaBackendFactory_probe(ALCalsaBackendFactory* UNUSED(self), enum DevProbe type, al_string *outnames)
+static void ALCalsaBackendFactory_probe(ALCalsaBackendFactory* UNUSED(self), enum DevProbe type, std::string *outnames)
{
auto add_device = [outnames](const DevMap &entry) -> void
{
- const char *name{entry.name.c_str()};
- size_t namelen{entry.name.length()};
/* +1 to also append the null char (to ensure a null-separated list and
* double-null terminated list).
*/
- alstr_append_range(outnames, name, name + namelen+1);
+ outnames->append(entry.name.c_str(), entry.name.length()+1);
};
switch(type)
{