Fix warning when enumerating empty map table

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13719 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-05-27 10:00:05 +00:00
parent 6102cb6edd
commit b6987f112f
4 changed files with 15 additions and 19 deletions

View file

@ -2570,14 +2570,6 @@ static NSCharacterSet *tokenSet = nil;
}
}
/**
* Create an empty MIME document.
*/
+ (GSMimeDocument*) mimeDocument
{
return AUTORELEASE([[self alloc] init]);
}
/**
* Adds a part to a multipart document
*/

View file

@ -504,21 +504,25 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
+ (NSArray *) allBundles
{
NSMapEnumerator enumerate;
NSMutableArray *array = [NSMutableArray arrayWithCapacity: 2];
void *key;
NSBundle *bundle;
[load_lock lock];
enumerate = NSEnumerateMapTable(_bundles);
while (NSNextMapEnumeratorPair(&enumerate, &key, (void **)&bundle))
if (_bundles != 0)
{
if (bundle->_bundleType == NSBUNDLE_FRAMEWORK)
continue;
NSMapEnumerator enumerate;
void *key;
NSBundle *bundle;
if ([array indexOfObjectIdenticalTo: bundle] == NSNotFound)
enumerate = NSEnumerateMapTable(_bundles);
while (NSNextMapEnumeratorPair(&enumerate, &key, (void **)&bundle))
{
[array addObject: bundle];
if (bundle->_bundleType == NSBUNDLE_FRAMEWORK)
continue;
if ([array indexOfObjectIdenticalTo: bundle] == NSNotFound)
{
[array addObject: bundle];
}
}
}
[load_lock unlock];