aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2018-11-16 18:44:43 -0800
committerChris Robinson <chris.kcat@gmail.com>2018-11-16 18:44:43 -0800
commit317acd6ae2f110c76fd1e019a3066c8c45b64921 (patch)
treeaa7827736707044b84a1f41d6177840eda26fb5c
parenta15a678da689681251312f19a30bc49e781e2c1d (diff)
Convert alEffect.c and alFilter.c to C++
-rw-r--r--CMakeLists.txt4
-rw-r--r--OpenAL32/alEffect.cpp (renamed from OpenAL32/alEffect.c)4
-rw-r--r--OpenAL32/alFilter.cpp (renamed from OpenAL32/alFilter.c)4
3 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30375389..509cc511 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -782,12 +782,12 @@ SET(OPENAL_OBJS
OpenAL32/Include/alBuffer.h
OpenAL32/alBuffer.cpp
OpenAL32/Include/alEffect.h
- OpenAL32/alEffect.c
+ OpenAL32/alEffect.cpp
OpenAL32/Include/alError.h
OpenAL32/alError.cpp
OpenAL32/alExtension.cpp
OpenAL32/Include/alFilter.h
- OpenAL32/alFilter.c
+ OpenAL32/alFilter.cpp
OpenAL32/Include/alListener.h
OpenAL32/alListener.cpp
OpenAL32/Include/alSource.h
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.cpp
index 67214957..b9a2623c 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.cpp
@@ -406,7 +406,7 @@ static ALeffect *AllocEffect(ALCcontext *context)
VECTOR_PUSH_BACK(device->EffectList, empty_sublist);
sublist = &VECTOR_BACK(device->EffectList);
sublist->FreeMask = ~U64(0);
- sublist->Effects = al_calloc(16, sizeof(ALeffect)*64);
+ sublist->Effects = static_cast<ALeffect*>(al_calloc(16, sizeof(ALeffect)*64));
if(UNLIKELY(!sublist->Effects))
{
VECTOR_POP_BACK(device->EffectList);
@@ -463,7 +463,7 @@ void ReleaseALEffects(ALCdevice *device)
sublist->FreeMask = ~usemask;
}
if(leftover > 0)
- WARN("(%p) Deleted "SZFMT" Effect%s\n", device, leftover, (leftover==1)?"":"s");
+ WARN("(%p) Deleted " SZFMT " Effect%s\n", device, leftover, (leftover==1)?"":"s");
}
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.cpp
index 3803fae6..a85c5dde 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.cpp
@@ -565,7 +565,7 @@ static ALfilter *AllocFilter(ALCcontext *context)
VECTOR_PUSH_BACK(device->FilterList, empty_sublist);
sublist = &VECTOR_BACK(device->FilterList);
sublist->FreeMask = ~U64(0);
- sublist->Filters = al_calloc(16, sizeof(ALfilter)*64);
+ sublist->Filters = static_cast<ALfilter*>(al_calloc(16, sizeof(ALfilter)*64));
if(UNLIKELY(!sublist->Filters))
{
VECTOR_POP_BACK(device->FilterList);
@@ -622,7 +622,7 @@ void ReleaseALFilters(ALCdevice *device)
sublist->FreeMask = ~usemask;
}
if(leftover > 0)
- WARN("(%p) Deleted "SZFMT" Filter%s\n", device, leftover, (leftover==1)?"":"s");
+ WARN("(%p) Deleted " SZFMT " Filter%s\n", device, leftover, (leftover==1)?"":"s");
}