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/winmm.cpp | |
parent | 4782d6107d250e3528c5e567dca48da727584ee7 (diff) |
Get rid of the unnecessary STATIC_(UP)CAST macros
Diffstat (limited to 'Alc/backends/winmm.cpp')
-rw-r--r-- | Alc/backends/winmm.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp index ab638cd4..31c39c52 100644 --- a/Alc/backends/winmm.cpp +++ b/Alc/backends/winmm.cpp @@ -196,7 +196,7 @@ void CALLBACK ALCwinmmPlayback_waveOutProc(HWAVEOUT UNUSED(device), UINT msg, FORCE_ALIGN int ALCwinmmPlayback_mixerProc(ALCwinmmPlayback *self) { - ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; + ALCdevice *device{self->mDevice}; SetRTPriority(); althrd_setname(MIXER_THREAD_NAME); @@ -233,7 +233,7 @@ FORCE_ALIGN int ALCwinmmPlayback_mixerProc(ALCwinmmPlayback *self) ALCenum ALCwinmmPlayback_open(ALCwinmmPlayback *self, const ALCchar *deviceName) { - ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; + ALCdevice *device{self->mDevice}; if(PlaybackDevices.empty()) ProbePlaybackDevices(); @@ -288,7 +288,7 @@ retry_open: ALCboolean ALCwinmmPlayback_reset(ALCwinmmPlayback *self) { - ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; + ALCdevice *device{self->mDevice}; device->UpdateSize = (ALuint)((ALuint64)device->UpdateSize * self->Format.nSamplesPerSec / @@ -509,7 +509,7 @@ int ALCwinmmCapture_captureProc(ALCwinmmCapture *self) ALCenum ALCwinmmCapture_open(ALCwinmmCapture *self, const ALCchar *deviceName) { - ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice; + ALCdevice *device{self->mDevice}; if(CaptureDevices.empty()) ProbeCaptureDevices(); @@ -700,15 +700,13 @@ ALCbackend *WinMMBackendFactory::createBackend(ALCdevice *device, ALCbackend_Typ { ALCwinmmPlayback *backend; NEW_OBJ(backend, ALCwinmmPlayback)(device); - if(!backend) return nullptr; - return STATIC_CAST(ALCbackend, backend); + return backend; } if(type == ALCbackend_Capture) { ALCwinmmCapture *backend; NEW_OBJ(backend, ALCwinmmCapture)(device); - if(!backend) return nullptr; - return STATIC_CAST(ALCbackend, backend); + return backend; } return nullptr; |