aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/oss.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-27 14:27:35 -0800
committerChris Robinson <[email protected]>2018-12-27 14:27:35 -0800
commitf2c2b7c5383ddd999b56f28730258f270b0d2576 (patch)
treef8940ac867fe81647597c0c42888fa23222fdb93 /Alc/backends/oss.cpp
parent4782d6107d250e3528c5e567dca48da727584ee7 (diff)
Get rid of the unnecessary STATIC_(UP)CAST macros
Diffstat (limited to 'Alc/backends/oss.cpp')
-rw-r--r--Alc/backends/oss.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp
index 73b62b30..e5630ad3 100644
--- a/Alc/backends/oss.cpp
+++ b/Alc/backends/oss.cpp
@@ -287,7 +287,7 @@ void ALCplaybackOSS_Destruct(ALCplaybackOSS *self)
int ALCplaybackOSS_mixerProc(ALCplaybackOSS *self)
{
- ALCdevice *device{STATIC_CAST(ALCbackend, self)->mDevice};
+ ALCdevice *device{self->mDevice};
SetRTPriority();
althrd_setname(MIXER_THREAD_NAME);
@@ -347,7 +347,7 @@ int ALCplaybackOSS_mixerProc(ALCplaybackOSS *self)
ALCenum ALCplaybackOSS_open(ALCplaybackOSS *self, const ALCchar *name)
{
- ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice;
+ ALCdevice *device{self->mDevice};
const char *devname{DefaultPlayback};
if(!name)
@@ -379,7 +379,7 @@ ALCenum ALCplaybackOSS_open(ALCplaybackOSS *self, const ALCchar *name)
ALCboolean ALCplaybackOSS_reset(ALCplaybackOSS *self)
{
- ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice;
+ ALCdevice *device{self->mDevice};
int numFragmentsLogSize;
int log2FragmentSize;
unsigned int periods;
@@ -461,7 +461,7 @@ ALCboolean ALCplaybackOSS_reset(ALCplaybackOSS *self)
ALCboolean ALCplaybackOSS_start(ALCplaybackOSS *self)
{
- ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice;
+ ALCdevice *device{self->mDevice};
try {
self->mMixData.resize(device->UpdateSize * device->frameSizeFromFmt());
@@ -587,7 +587,7 @@ int ALCcaptureOSS_recordProc(ALCcaptureOSS *self)
ALCenum ALCcaptureOSS_open(ALCcaptureOSS *self, const ALCchar *name)
{
- ALCdevice *device = STATIC_CAST(ALCbackend, self)->mDevice;
+ ALCdevice *device{self->mDevice};
const char *devname{DefaultCapture};
if(!name)
@@ -797,15 +797,13 @@ ALCbackend *OSSBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type
{
ALCplaybackOSS *backend;
NEW_OBJ(backend, ALCplaybackOSS)(device);
- if(!backend) return nullptr;
- return STATIC_CAST(ALCbackend, backend);
+ return backend;
}
if(type == ALCbackend_Capture)
{
ALCcaptureOSS *backend;
NEW_OBJ(backend, ALCcaptureOSS)(device);
- if(!backend) return nullptr;
- return STATIC_CAST(ALCbackend, backend);
+ return backend;
}
return nullptr;