mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Add missing calls to super/self initialization in NSDateFormatter.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32185 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b96b154e5e
commit
ce4afe2874
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-02-16 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSDateFormatter.m (-initWithCoder:, -initWithDateFormat:):
|
||||
Add missing calls to super/self initialization.
|
||||
|
||||
2011-02-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/common.h:
|
||||
|
|
|
@ -242,6 +242,10 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
self = [super initWithCoder: aCoder];
|
||||
if (self == nil)
|
||||
return nil;
|
||||
|
||||
[aCoder decodeValuesOfObjCTypes: "@C", &_dateFormat, &_allowsNaturalLanguage];
|
||||
return self;
|
||||
}
|
||||
|
@ -249,6 +253,10 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
|||
- (id) initWithDateFormat: (NSString *)format
|
||||
allowNaturalLanguage: (BOOL)flag
|
||||
{
|
||||
self = [self init];
|
||||
if (self == nil)
|
||||
return nil;
|
||||
|
||||
_dateFormat = [format copy];
|
||||
_allowsNaturalLanguage = flag;
|
||||
internal->_behavior = NSDateFormatterBehavior10_0;
|
||||
|
|
Loading…
Reference in a new issue