mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Removed super calls from coding methods to avoid compiler warning.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8272 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
db512aaaf8
commit
339c81cdff
1 changed files with 14 additions and 16 deletions
|
@ -37,7 +37,7 @@
|
|||
- (id) copyWithZone: (NSZone*)aZone
|
||||
{
|
||||
if (NSShouldRetainWithZone(self, aZone) == YES)
|
||||
return [self retain];
|
||||
return RETAIN(self);
|
||||
return NSCopyObject(self, 0, aZone);
|
||||
}
|
||||
|
||||
|
@ -118,16 +118,17 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
tab = [[NSTextTab alloc] initWithType: NSLeftTabStopType
|
||||
location: (i*1)*28.0];
|
||||
[style->tabStops addObject: tab];
|
||||
[tab release];
|
||||
RELEASE(tab);
|
||||
}
|
||||
|
||||
defaultStyle = style;
|
||||
/*
|
||||
* If another thread was doing this at the same time, it may have
|
||||
* assigned it's own defaultStyle - if so we use that and discard ours.
|
||||
*/
|
||||
if (defaultStyle != style)
|
||||
[style release];
|
||||
if (defaultStyle != nil)
|
||||
RELEASE(style);
|
||||
else
|
||||
defaultStyle = style;
|
||||
}
|
||||
return defaultStyle;
|
||||
}
|
||||
|
@ -139,7 +140,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
NSLog(@"Argh - attempt to dealloc the default paragraph style!");
|
||||
return;
|
||||
}
|
||||
[tabStops release];
|
||||
RELEASE(tabStops);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -155,6 +156,8 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
minimumLineHeight = 0.0;
|
||||
paragraphSpacing = 0.0;
|
||||
tailIndent = 0.0;
|
||||
// FIXME: I find it surprising that this is mutable, this propably was done to
|
||||
// reuse it for NSMutableParagraphStyle. Still I think it is wrong.
|
||||
tabStops = [[NSMutableArray allocWithZone: [self zone]] initWithCapacity: 12];
|
||||
return self;
|
||||
}
|
||||
|
@ -218,7 +221,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
*/
|
||||
- (NSArray *) tabStops
|
||||
{
|
||||
return [[tabStops copyWithZone: NSDefaultMallocZone()] autorelease];
|
||||
return AUTORELEASE([tabStops copyWithZone: NSDefaultMallocZone()]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -247,14 +250,13 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
- (id) copyWithZone: (NSZone*)aZone
|
||||
{
|
||||
if (NSShouldRetainWithZone(self, aZone) == YES)
|
||||
return [self retain];
|
||||
return RETAIN(self);
|
||||
else
|
||||
{
|
||||
NSParagraphStyle *c;
|
||||
|
||||
c = (NSParagraphStyle*)NSCopyObject(self, 0, aZone);
|
||||
c->tabStops = [NSMutableArray allocWithZone: aZone];
|
||||
c->tabStops = [c->tabStops initWithArray: tabStops];
|
||||
c->tabStops = [tabStops mutableCopyWithZone: aZone];
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
@ -272,8 +274,6 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
{
|
||||
unsigned count;
|
||||
|
||||
self = [super initWithCoder: aCoder];
|
||||
|
||||
[aCoder decodeValueOfObjCType: @encode(NSTextAlignment) at: &alignment];
|
||||
[aCoder decodeValueOfObjCType: @encode(NSLineBreakMode) at: &lineBreakMode];
|
||||
[aCoder decodeValueOfObjCType: @encode(float) at: &firstLineHeadIndent];
|
||||
|
@ -308,7 +308,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
tab = [NSTextTab alloc];
|
||||
tab = [tab initWithType: types[i] location: locations[i]];
|
||||
[tabStops addObject: tab];
|
||||
[tab release];
|
||||
RELEASE(tab);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -319,8 +319,6 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
{
|
||||
unsigned count;
|
||||
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
[aCoder encodeValueOfObjCType: @encode(NSTextAlignment) at: &alignment];
|
||||
[aCoder encodeValueOfObjCType: @encode(NSLineBreakMode) at: &lineBreakMode];
|
||||
[aCoder encodeValueOfObjCType: @encode(float) at: &firstLineHeadIndent];
|
||||
|
@ -366,7 +364,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
|
||||
+ (NSParagraphStyle*) defaultParagraphStyle
|
||||
{
|
||||
return [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease];
|
||||
return AUTORELEASE([[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
|
||||
}
|
||||
|
||||
- (void) setLineSpacing: (float)aFloat
|
||||
|
|
Loading…
Reference in a new issue