Correction for issue with gcc 3.4.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20243 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-10-22 12:20:01 +00:00
parent 6ff377994a
commit 78b37d430e
3 changed files with 39 additions and 14 deletions

View file

@ -341,22 +341,42 @@ static inline void HighlightDownButton(NSRect aRect)
//
- (void) encodeWithCoder: (NSCoder*)aCoder
{
BOOL tmp1, tmp2;
int tmp1, tmp2;
[super encodeWithCoder: aCoder];
tmp1 = _autorepeat;
tmp2 = _valueWraps;
[aCoder encodeValuesOfObjCTypes: "dddii",
&_maxValue, &_minValue, &_increment, &tmp1, &tmp2];
tmp1 = (int)_autorepeat;
tmp2 = (int)_valueWraps;
[aCoder encodeValueOfObjCType: @encode(double)
at: &_maxValue];
[aCoder encodeValueOfObjCType: @encode(double)
at: &_minValue];
[aCoder encodeValueOfObjCType: @encode(double)
at: &_increment];
[aCoder encodeValueOfObjCType: @encode(int)
at: &tmp1];
[aCoder encodeValueOfObjCType: @encode(int)
at: &tmp2];
}
- (id) initWithCoder: (NSCoder*)aDecoder
{
BOOL tmp1, tmp2;
int tmp1, tmp2;
[super initWithCoder: aDecoder];
[aDecoder decodeValuesOfObjCTypes: "dddii",
&_maxValue, &_minValue, &_increment, &tmp1, &tmp2];
_autorepeat = tmp1;
_valueWraps = tmp2;
[aDecoder decodeValueOfObjCType: @encode(double)
at: &_maxValue];
[aDecoder decodeValueOfObjCType: @encode(double)
at: &_minValue];
[aDecoder decodeValueOfObjCType: @encode(double)
at: &_increment];
[aDecoder decodeValueOfObjCType: @encode(int)
at: &tmp1];
[aDecoder decodeValueOfObjCType: @encode(int)
at: &tmp2];
_autorepeat = (BOOL)tmp1;
_valueWraps = (BOOL)tmp2;
return self;
}