From da4f5c6f96b04094bf37e5c7ac393a7bfbfbb681 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 28 Nov 2010 19:52:17 -0800 Subject: Uninline some functions Also add -Winline to the compiler command line to watch for future inline problems --- Alc/ALc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Alc/ALc.c') 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 -- cgit v1.2.3