aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/oss.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/oss.cpp
parentd4f64b9e29319f56f2ecab1291918a52ec8336f1 (diff)
Use std::string instead of al_string for enumerating
Diffstat (limited to 'Alc/backends/oss.cpp')
-rw-r--r--Alc/backends/oss.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp
index 65212fba..618730b3 100644
--- a/Alc/backends/oss.cpp
+++ b/Alc/backends/oss.cpp
@@ -774,7 +774,7 @@ ALCbackendFactory *ALCossBackendFactory_getFactory(void);
static ALCboolean ALCossBackendFactory_init(ALCossBackendFactory *self);
static void ALCossBackendFactory_deinit(ALCossBackendFactory *self);
static ALCboolean ALCossBackendFactory_querySupport(ALCossBackendFactory *self, ALCbackend_Type type);
-static void ALCossBackendFactory_probe(ALCossBackendFactory *self, enum DevProbe type, al_string *outnames);
+static void ALCossBackendFactory_probe(ALCossBackendFactory *self, enum DevProbe type, std::string *outnames);
static ALCbackend* ALCossBackendFactory_createBackend(ALCossBackendFactory *self, ALCdevice *device, ALCbackend_Type type);
DEFINE_ALCBACKENDFACTORY_VTABLE(ALCossBackendFactory);
@@ -812,7 +812,7 @@ ALCboolean ALCossBackendFactory_querySupport(ALCossBackendFactory* UNUSED(self),
return ALC_FALSE;
}
-void ALCossBackendFactory_probe(ALCossBackendFactory* UNUSED(self), enum DevProbe type, al_string *outnames)
+void ALCossBackendFactory_probe(ALCossBackendFactory* UNUSED(self), enum DevProbe type, std::string *outnames)
{
auto add_device = [outnames](const DevMap &entry) -> void
{
@@ -821,8 +821,8 @@ void ALCossBackendFactory_probe(ALCossBackendFactory* UNUSED(self), enum DevProb
if(stat(entry.device_name.c_str(), &buf) == 0)
#endif
{
- const char *name{entry.name.c_str()};
- alstr_append_range(outnames, name, name+entry.name.length()+1);
+ /* Includes null char. */
+ outnames->append(entry.name.c_str(), entry.name.length()+1);
}
};