mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 02:10:37 +00:00
Better copying
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6406 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
41b7ca405d
commit
aef56c9336
3 changed files with 13 additions and 7 deletions
|
@ -182,12 +182,17 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
- copyWithZone: (NSZone *)zone
|
||||
{
|
||||
GSFontInfo *copy;
|
||||
copy = (GSFontInfo*) NSCopyObject (self, 0, zone);
|
||||
RETAIN(fontDictionary);
|
||||
RETAIN(fontName);
|
||||
RETAIN(familyName);
|
||||
RETAIN(weight);
|
||||
RETAIN(encodingScheme);
|
||||
if (NSShouldRetainWithZone(self, zone))
|
||||
copy = RETAIN(self);
|
||||
else
|
||||
{
|
||||
copy = (GSFontInfo*) NSCopyObject (self, 0, zone);
|
||||
[copy->fontDictionary copyWithZone: zone];
|
||||
[copy->fontName copyWithZone: zone];
|
||||
[copy->familyName copyWithZone: zone];
|
||||
[copy->weight copyWithZone: zone];
|
||||
[copy->encodingScheme copyWithZone: zone];
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue