mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +00:00
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:
parent
73567219c7
commit
97d4a3e0d0
4 changed files with 15 additions and 19 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
* Headers/Foundation/GSMime.h: Tidy up and add convenience methods.
|
* Headers/Foundation/GSMime.h: Tidy up and add convenience methods.
|
||||||
* Source/Additions/GSMime.m: Tidy up and add convenience methods.
|
* Source/Additions/GSMime.m: Tidy up and add convenience methods.
|
||||||
|
* Source/NSBundle.m: ([+allBundles]) Don't enumeraste if map table
|
||||||
|
has not been created yet.
|
||||||
|
|
||||||
2002-05-26 Fred Kiefer <FredKiefer@gmx.de>
|
2002-05-26 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
|
|
@ -86,8 +86,6 @@
|
||||||
id content;
|
id content;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (GSMimeDocument*) mimeDocument;
|
|
||||||
|
|
||||||
- (BOOL) addContent: (id)newContent;
|
- (BOOL) addContent: (id)newContent;
|
||||||
- (BOOL) addHeader: (GSMimeHeader*)info;
|
- (BOOL) addHeader: (GSMimeHeader*)info;
|
||||||
- (NSArray*) allHeaders;
|
- (NSArray*) allHeaders;
|
||||||
|
|
|
@ -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
|
* Adds a part to a multipart document
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -504,21 +504,25 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
||||||
|
|
||||||
+ (NSArray *) allBundles
|
+ (NSArray *) allBundles
|
||||||
{
|
{
|
||||||
NSMapEnumerator enumerate;
|
|
||||||
NSMutableArray *array = [NSMutableArray arrayWithCapacity: 2];
|
NSMutableArray *array = [NSMutableArray arrayWithCapacity: 2];
|
||||||
void *key;
|
|
||||||
NSBundle *bundle;
|
|
||||||
|
|
||||||
[load_lock lock];
|
[load_lock lock];
|
||||||
enumerate = NSEnumerateMapTable(_bundles);
|
if (_bundles != 0)
|
||||||
while (NSNextMapEnumeratorPair(&enumerate, &key, (void **)&bundle))
|
|
||||||
{
|
{
|
||||||
if (bundle->_bundleType == NSBUNDLE_FRAMEWORK)
|
NSMapEnumerator enumerate;
|
||||||
continue;
|
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];
|
[load_lock unlock];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue