Add encodings

This commit is contained in:
Gregory John Casamento 2019-10-02 05:12:07 -04:00
parent 0dd8791f2e
commit 9f84664b05

View file

@ -1,4 +1,3 @@
/* Implementation of class NSUnit
Copyright (C) 2019 Free Software Foundation, Inc.
@ -83,10 +82,13 @@
{
if([coder allowsKeyedCoding])
{
[coder encodeDouble: _coefficient forKey: @"coefficient"];
[coder encodeDouble: _constant forKey: @"constant"];
}
else
{
[coder encodeValueOfObjCType: @encode(double) at: &_coefficient];
[coder encodeValueOfObjCType: @encode(double) at: &_constant];
}
}