aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-11-28 19:52:17 -0800
committerChris Robinson <[email protected]>2010-11-28 19:52:17 -0800
commitda4f5c6f96b04094bf37e5c7ac393a7bfbfbb681 (patch)
treef467c94351e81f7ede5f3ac4847a8cbbe117b516 /Alc/ALc.c
parentf09ae196a83c8a64fdd29e60b30dc51a367cb1c9 (diff)
Uninline some functions
Also add -Winline to the compiler command line to watch for future inline problems
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index d2bdf144..2463ab12 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -757,6 +757,26 @@ void RemoveUIntMapKey(UIntMap *map, ALuint key)
}
}
+ALvoid *LookupUIntMapKey(UIntMap *map, ALuint key)
+{
+ if(map->size > 0)
+ {
+ ALsizei low = 0;
+ ALsizei high = map->size - 1;
+ while(low < high)
+ {
+ ALsizei mid = low + (high-low)/2;
+ if(map->array[mid].key < key)
+ low = mid + 1;
+ else
+ high = mid;
+ }
+ if(map->array[low].key == key)
+ return map->array[low].value;
+ }
+ return NULL;
+}
+
/*
IsDevice