mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +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
|
@ -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…
Add table
Add a link
Reference in a new issue