aboutsummaryrefslogtreecommitdiffstats
path: root/router/router.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-28 14:48:12 -0700
committerChris Robinson <[email protected]>2020-04-28 14:48:12 -0700
commitcf64dc1103ea4a1221e70259cb09f96283f2d8fb (patch)
treeb7f099879b373d1dac1e4fc58f33e9cb9e90168a /router/router.cpp
parent2520d492a573f4994e5428e9f9c57cfed9c12616 (diff)
Fix up some more uses of [AL[C]]void
Diffstat (limited to 'router/router.cpp')
-rw-r--r--router/router.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/router/router.cpp b/router/router.cpp
index 85a75aea..3d27af24 100644
--- a/router/router.cpp
+++ b/router/router.cpp
@@ -360,7 +360,7 @@ PtrIntMap::~PtrIntMap()
mCapacity = 0;
}
-ALenum PtrIntMap::insert(ALvoid *key, ALint value)
+ALenum PtrIntMap::insert(void *key, int value)
{
std::lock_guard<std::mutex> maplock{mLock};
auto iter = std::lower_bound(mKeys, mKeys+mSize, key);
@@ -370,15 +370,15 @@ ALenum PtrIntMap::insert(ALvoid *key, ALint value)
{
if(mSize == mCapacity)
{
- ALvoid **newkeys{nullptr};
+ void **newkeys{nullptr};
ALsizei newcap{mCapacity ? (mCapacity<<1) : 4};
if(newcap > mCapacity)
- newkeys = static_cast<ALvoid**>(
+ newkeys = static_cast<void**>(
al_calloc(16, (sizeof(mKeys[0])+sizeof(mValues[0]))*newcap)
);
if(!newkeys)
return AL_OUT_OF_MEMORY;
- auto newvalues = reinterpret_cast<ALint*>(&newkeys[newcap]);
+ auto newvalues = reinterpret_cast<int*>(&newkeys[newcap]);
if(mKeys)
{
@@ -404,9 +404,9 @@ ALenum PtrIntMap::insert(ALvoid *key, ALint value)
return AL_NO_ERROR;
}
-ALint PtrIntMap::removeByKey(ALvoid *key)
+int PtrIntMap::removeByKey(void *key)
{
- ALint ret = -1;
+ int ret = -1;
std::lock_guard<std::mutex> maplock{mLock};
auto iter = std::lower_bound(mKeys, mKeys+mSize, key);
@@ -425,9 +425,9 @@ ALint PtrIntMap::removeByKey(ALvoid *key)
return ret;
}
-ALint PtrIntMap::lookupByKey(ALvoid *key)
+int PtrIntMap::lookupByKey(void *key)
{
- ALint ret = -1;
+ int ret = -1;
std::lock_guard<std::mutex> maplock{mLock};
auto iter = std::lower_bound(mKeys, mKeys+mSize, key);