mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Imporve keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34049 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
eee46e56de
commit
d3a9215d05
3 changed files with 52 additions and 12 deletions
|
@ -591,9 +591,26 @@ static NSAffineTransformStruct identityTransform = {
|
|||
{
|
||||
NSAffineTransformStruct replace;
|
||||
|
||||
[aCoder decodeArrayOfObjCType: @encode(CGFloat)
|
||||
count: 6
|
||||
at: (CGFloat*)&replace];
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// FIXME
|
||||
/*
|
||||
NSData *data = [aCoder decodeObjectForKey: @"NSTransformStruct"];
|
||||
unsigned int cursor = 0;
|
||||
// We get lengths of 12 and 18
|
||||
NSLog(@"length %d data %@", [data length], data);
|
||||
[data deserializeDataAt: (CGFloat*)&replace
|
||||
ofObjCType: "[6f]"
|
||||
atCursor: &cursor
|
||||
context: nil];
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
[aCoder decodeArrayOfObjCType: @encode(CGFloat)
|
||||
count: 6
|
||||
at: (CGFloat*)&replace];
|
||||
}
|
||||
[self setTransformStruct: replace];
|
||||
return self;
|
||||
}
|
||||
|
@ -603,9 +620,16 @@ static NSAffineTransformStruct identityTransform = {
|
|||
NSAffineTransformStruct replace;
|
||||
|
||||
replace = [self transformStruct];
|
||||
[aCoder encodeArrayOfObjCType: @encode(CGFloat)
|
||||
count: 6
|
||||
at: (CGFloat*)&replace];
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
else
|
||||
{
|
||||
[aCoder encodeArrayOfObjCType: @encode(CGFloat)
|
||||
count: 6
|
||||
at: (CGFloat*)&replace];
|
||||
}
|
||||
}
|
||||
|
||||
@end /* NSAffineTransform */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue