mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 02:01:02 +00:00
Indentation and trivial efficiency fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10170 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b9d6351bc9
commit
918c047557
1 changed files with 16 additions and 7 deletions
|
@ -77,11 +77,13 @@
|
|||
if (wtypes != nil)
|
||||
{
|
||||
types = [wtypes mutableCopy];
|
||||
[(NSMutableArray *)types addObjectsFromArray:
|
||||
[NSArray arrayWithObjects: @"tiff", @"tif", nil]];
|
||||
[(NSMutableArray *)types addObject: @"tiff"];
|
||||
[(NSMutableArray *)types addObject: @"tif"];
|
||||
}
|
||||
else
|
||||
types = [[NSArray alloc] initWithObjects: @"tiff", @"tif", nil];
|
||||
{
|
||||
types = [[NSArray alloc] initWithObjects: @"tiff", @"tif", nil];
|
||||
}
|
||||
}
|
||||
|
||||
return types;
|
||||
|
@ -105,7 +107,9 @@
|
|||
|
||||
array = [self imageRepsWithData: tiffData];
|
||||
if ([array count])
|
||||
return [array objectAtIndex: 0];
|
||||
{
|
||||
return [array objectAtIndex: 0];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -128,9 +132,11 @@
|
|||
for (i = 0; i < images; i++)
|
||||
{
|
||||
NSBitmapImageRep* imageRep;
|
||||
imageRep = [[[self class] alloc] _initFromTIFFImage: image number: i];
|
||||
imageRep = [[self alloc] _initFromTIFFImage: image number: i];
|
||||
if (imageRep)
|
||||
[array addObject: AUTORELEASE(imageRep)];
|
||||
{
|
||||
[array addObject: AUTORELEASE(imageRep)];
|
||||
}
|
||||
}
|
||||
NSTiffClose(image);
|
||||
|
||||
|
@ -618,6 +624,7 @@
|
|||
NSLog(@"Extension missing from filename - '%@'", filename);
|
||||
return nil;
|
||||
}
|
||||
|
||||
if ([[self imageUnfilteredFileTypes] indexOfObject: ext] != NSNotFound)
|
||||
{
|
||||
NSData* data = [NSData dataWithContentsOfFile: filename];
|
||||
|
@ -631,7 +638,9 @@
|
|||
imageRep = [[[self class] alloc] _initFromWrasterFile: filename
|
||||
number: images];
|
||||
if (imageRep)
|
||||
[array addObject: AUTORELEASE(imageRep)];
|
||||
{
|
||||
[array addObject: AUTORELEASE(imageRep)];
|
||||
}
|
||||
images++;
|
||||
}
|
||||
while (imageRep);
|
||||
|
|
Loading…
Reference in a new issue