diff options
author | Chris Robinson <[email protected]> | 2018-11-15 04:24:33 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-15 04:24:33 -0800 |
commit | 1971d0f5c6c94b250f4b3e29bdfa95c836f900bc (patch) | |
tree | b3af8bbd22fe26ad4db683214911897fae767ae3 /Alc/backends/null.cpp | |
parent | d4f64b9e29319f56f2ecab1291918a52ec8336f1 (diff) |
Use std::string instead of al_string for enumerating
Diffstat (limited to 'Alc/backends/null.cpp')
-rw-r--r-- | Alc/backends/null.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Alc/backends/null.cpp b/Alc/backends/null.cpp index ccb1327f..c8523c88 100644 --- a/Alc/backends/null.cpp +++ b/Alc/backends/null.cpp @@ -185,7 +185,7 @@ ALCbackendFactory *ALCnullBackendFactory_getFactory(void); static ALCboolean ALCnullBackendFactory_init(ALCnullBackendFactory *self); static DECLARE_FORWARD(ALCnullBackendFactory, ALCbackendFactory, void, deinit) static ALCboolean ALCnullBackendFactory_querySupport(ALCnullBackendFactory *self, ALCbackend_Type type); -static void ALCnullBackendFactory_probe(ALCnullBackendFactory *self, enum DevProbe type, al_string *outnames); +static void ALCnullBackendFactory_probe(ALCnullBackendFactory *self, enum DevProbe type, std::string *outnames); static ALCbackend* ALCnullBackendFactory_createBackend(ALCnullBackendFactory *self, ALCdevice *device, ALCbackend_Type type); DEFINE_ALCBACKENDFACTORY_VTABLE(ALCnullBackendFactory); @@ -214,13 +214,15 @@ static ALCboolean ALCnullBackendFactory_querySupport(ALCnullBackendFactory* UNUS return ALC_FALSE; } -static void ALCnullBackendFactory_probe(ALCnullBackendFactory* UNUSED(self), enum DevProbe type, al_string *outnames) +static void ALCnullBackendFactory_probe(ALCnullBackendFactory* UNUSED(self), enum DevProbe type, std::string *outnames) { switch(type) { case ALL_DEVICE_PROBE: + /* Includes null char. */ + outnames->append(nullDevice, sizeof(nullDevice)); + break; case CAPTURE_DEVICE_PROBE: - alstr_append_range(outnames, nullDevice, nullDevice+sizeof(nullDevice)); break; } } |