diff options
author | Chris Robinson <[email protected]> | 2018-12-27 14:27:35 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-27 14:27:35 -0800 |
commit | f2c2b7c5383ddd999b56f28730258f270b0d2576 (patch) | |
tree | f8940ac867fe81647597c0c42888fa23222fdb93 /Alc/backends/null.cpp | |
parent | 4782d6107d250e3528c5e567dca48da727584ee7 (diff) |
Get rid of the unnecessary STATIC_(UP)CAST macros
Diffstat (limited to 'Alc/backends/null.cpp')
-rw-r--r-- | Alc/backends/null.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Alc/backends/null.cpp b/Alc/backends/null.cpp index 2b2a4b84..7a4cf475 100644 --- a/Alc/backends/null.cpp +++ b/Alc/backends/null.cpp @@ -83,7 +83,7 @@ void ALCnullBackend_Destruct(ALCnullBackend *self) int ALCnullBackend_mixerProc(ALCnullBackend *self) { - ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; + ALCdevice *device{self->mDevice}; const milliseconds restTime{device->UpdateSize*1000/device->Frequency / 2}; SetRTPriority(); @@ -130,14 +130,12 @@ int ALCnullBackend_mixerProc(ALCnullBackend *self) ALCenum ALCnullBackend_open(ALCnullBackend *self, const ALCchar *name) { - ALCdevice *device; - if(!name) name = nullDevice; else if(strcmp(name, nullDevice) != 0) return ALC_INVALID_VALUE; - device = STATIC_CAST(ALCbackend, self)->mDevice; + ALCdevice *device{self->mDevice}; device->DeviceName = name; return ALC_NO_ERROR; @@ -145,7 +143,7 @@ ALCenum ALCnullBackend_open(ALCnullBackend *self, const ALCchar *name) ALCboolean ALCnullBackend_reset(ALCnullBackend *self) { - SetDefaultWFXChannelOrder(STATIC_CAST(ALCbackend, self)->mDevice); + SetDefaultWFXChannelOrder(self->mDevice); return ALC_TRUE; } @@ -199,8 +197,7 @@ ALCbackend *NullBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type { ALCnullBackend *backend; NEW_OBJ(backend, ALCnullBackend)(device); - if(!backend) return NULL; - return STATIC_CAST(ALCbackend, backend); + return backend; } return NULL; |