mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +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
c546924dd5
commit
b7bc218133
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>
|
2011-02-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/common.h:
|
* Source/common.h:
|
||||||
|
|
|
@ -242,6 +242,10 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)aCoder
|
- (id) initWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
|
self = [super initWithCoder: aCoder];
|
||||||
|
if (self == nil)
|
||||||
|
return nil;
|
||||||
|
|
||||||
[aCoder decodeValuesOfObjCTypes: "@C", &_dateFormat, &_allowsNaturalLanguage];
|
[aCoder decodeValuesOfObjCTypes: "@C", &_dateFormat, &_allowsNaturalLanguage];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -249,6 +253,10 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
||||||
- (id) initWithDateFormat: (NSString *)format
|
- (id) initWithDateFormat: (NSString *)format
|
||||||
allowNaturalLanguage: (BOOL)flag
|
allowNaturalLanguage: (BOOL)flag
|
||||||
{
|
{
|
||||||
|
self = [self init];
|
||||||
|
if (self == nil)
|
||||||
|
return nil;
|
||||||
|
|
||||||
_dateFormat = [format copy];
|
_dateFormat = [format copy];
|
||||||
_allowsNaturalLanguage = flag;
|
_allowsNaturalLanguage = flag;
|
||||||
internal->_behavior = NSDateFormatterBehavior10_0;
|
internal->_behavior = NSDateFormatterBehavior10_0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue