X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sope-core%2FNGExtensions%2FNGHashMap.m;h=ea3ce23b4f69bb2f1afd91d99a466cf8861f5845;hb=9a10e7946850d5ca9cf3173ee05f687d053f55ec;hp=c6394a28e7eea8d4da43b875c665be87c9932051;hpb=7eadc020be39163d31271943ebe303a97725794e;p=sope diff --git a/sope-core/NGExtensions/NGHashMap.m b/sope-core/NGExtensions/NGHashMap.m index c6394a28..ea3ce23b 100644 --- a/sope-core/NGExtensions/NGHashMap.m +++ b/sope-core/NGExtensions/NGHashMap.m @@ -18,15 +18,11 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: NGHashMap.m 4 2004-08-20 17:04:31Z helge $ #include "NGHashMap.h" #include "common.h" -#if LIB_FOUNDATION_LIBRARY -# import -#endif - #if !LIB_FOUNDATION_LIBRARY @interface NSException(SetUI) /* allowed on Jaguar ? */ - (void)setUserInfo:(NSDictionary *)_ui; @@ -411,17 +407,10 @@ static inline unsigned __countObjectsForKey(NGHashMap *self, id _key) { return nil; if ((_index < list->count) == 0) { -#if LIB_FOUNDATION_LIBRARY - NSException *exc = [[IndexOutOfRangeException alloc] - initForSize:list->count index:_index]; - [exc setUserInfo: - [NSDictionary dictionaryWithObject:self forKey:@"object"]]; - [exc raise]; -#else [NSException raise:NSRangeException format:@"index %d out of range for key %@ of length %d", _index, _key, list->count]; -#endif + return nil; } while (_index--) @@ -731,16 +720,10 @@ static inline unsigned __countObjectsForKey(NGHashMap *self, id _key) { checkForAddErrorMessage(self, _objects[0],_key); if ((root = [self __structForKey:_key]) == NULL) { if (_index > 0) { -#if LIB_FOUNDATION_LIBRARY - NSException *exc = [[IndexOutOfRangeException alloc] - initForSize:0 index:_index]; - [exc setUserInfo:[NSDictionary dictionaryWithObject:self forKey:@"map"]]; - [exc raise]; -#else [NSException raise:NSRangeException format:@"index %d out of range in map 0x%08X", _index, self]; -#endif + return; } root = initLListElement(_objects[0], NULL); @@ -749,16 +732,10 @@ static inline unsigned __countObjectsForKey(NGHashMap *self, id _key) { } else { if (!(_index < root->count)) { -#if LIB_FOUNDATION_LIBRARY - NSException *exc = [[IndexOutOfRangeException alloc] - initForSize:root->count index:_index]; - [exc setUserInfo:[NSDictionary dictionaryWithObject:self forKey:@"map"]]; - [exc raise]; -#else [NSException raise:NSRangeException format:@"index %d out of range in map 0x%08X length %d", _index, self, root->count]; -#endif + return; } root->count += _count;