|
From: | Gregory Casamento |
Subject: | Re: NSButtonImageSource weird code |
Date: | Wed, 10 Jul 2013 15:43:25 -0400 |
Hi,
the following method of NSButtonImageSource looks weird :
NSMutableDictionary *sources = nil;
+ (id) buttonImageSourceWithName: (NSString*)name
{
NSButtonImageSource *source;
source = [sources objectForKey: name];
if (source == nil)
{
source = [self alloc];
source->imageName = [name copy];
source->images = [NSMutableDictionary new];
[sources setObject: source forKey: sources->imageName];
RELEASE(source);
}
return source;
}
I think the line where the new object is added to the sources dictionary should be :
[sources setObject: source forKey: source->imageName];
instead of
[sources setObject: source forKey: sources->imageName];
What do you think ?
_______________________________________________
Gnustep-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/gnustep-dev
[Prev in Thread] | Current Thread | [Next in Thread] |