Skip to content

Commit

Permalink
Fix GCC compat
Browse files Browse the repository at this point in the history
  • Loading branch information
hmelder committed Oct 10, 2024
1 parent c2427a8 commit 1b671e9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Source/NSDate.m
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,12 @@ - (id) initWithTimeIntervalSinceReferenceDate: (NSTimeInterval)secs
}
#endif

#if USE_SMALL_DATE == 0
_seconds_since_ref = secs;
return self;
#else
return CREATE_SMALL_DATE(secs);
#endif
}

- (id) initWithCoder: (NSCoder*)coder
Expand All @@ -353,7 +358,12 @@ - (id) initWithCoder: (NSCoder*)coder
at: &secondsSinceRef];
}

#if USE_SMALL_DATE == 0
_seconds_since_ref = secondsSinceRef;
return self;
#else
return CREATE_SMALL_DATE(secondsSinceRef);
#endif
}

// NSDate Hashing, Comparison and Equality
Expand Down

0 comments on commit 1b671e9

Please sign in to comment.