mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
use init return value
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31277 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
703219c464
commit
1d57899ad8
2 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
2010-09-10 Riccardo Mottola
|
||||
|
||||
* Source/unix/GSRunLoopCtxt.m: only access array if port responds to selector, or it is not initialized.
|
||||
* NSDate.m: use init return value
|
||||
|
||||
2010-09-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -1142,7 +1142,7 @@ otherTime(NSDate* other)
|
|||
timeZone: (NSTimeZone*)timeZone
|
||||
{
|
||||
NSCalendarDate *d = [calendarClass alloc];
|
||||
[d initWithTimeIntervalSinceReferenceDate: otherTime(self)];
|
||||
d = [d initWithTimeIntervalSinceReferenceDate: otherTime(self)];
|
||||
[d setCalendarFormat: formatString];
|
||||
[d setTimeZone: timeZone];
|
||||
return AUTORELEASE(d);
|
||||
|
@ -1157,7 +1157,7 @@ otherTime(NSDate* other)
|
|||
// Easiest to just have NSCalendarDate do the work for us
|
||||
NSString *s;
|
||||
NSCalendarDate *d = [calendarClass alloc];
|
||||
[d initWithTimeIntervalSinceReferenceDate: otherTime(self)];
|
||||
d = [d initWithTimeIntervalSinceReferenceDate: otherTime(self)];
|
||||
s = [d description];
|
||||
RELEASE(d);
|
||||
return s;
|
||||
|
@ -1176,7 +1176,7 @@ otherTime(NSDate* other)
|
|||
NSCalendarDate *d = [calendarClass alloc];
|
||||
id f;
|
||||
|
||||
[d initWithTimeIntervalSinceReferenceDate: otherTime(self)];
|
||||
d = [d initWithTimeIntervalSinceReferenceDate: otherTime(self)];
|
||||
if (!format)
|
||||
f = [d calendarFormat];
|
||||
else
|
||||
|
@ -1198,7 +1198,7 @@ otherTime(NSDate* other)
|
|||
// Easiest to just have NSCalendarDate do the work for us
|
||||
NSString *s;
|
||||
NSCalendarDate *d = [calendarClass alloc];
|
||||
[d initWithTimeIntervalSinceReferenceDate: otherTime(self)];
|
||||
d = [d initWithTimeIntervalSinceReferenceDate: otherTime(self)];
|
||||
s = [d descriptionWithLocale: locale];
|
||||
RELEASE(d);
|
||||
return s;
|
||||
|
|
Loading…
Reference in a new issue