diff options
Diffstat (limited to 'router/router.cpp')
-rw-r--r-- | router/router.cpp | 16 |
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); |