mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 16:50:42 +00:00
* Source/NSISO8601DateFormatter.m,
* Source/NSOrthography.m: Clean up some compiler warnings.
This commit is contained in:
parent
6c7defba24
commit
e71c2f68fa
3 changed files with 65 additions and 25 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-05-10 Fred Kiefer <fredkiefer@gmx.de>
|
||||
|
||||
* Source/NSISO8601DateFormatter.m,
|
||||
* Source/NSOrthography.m: Clean up some compiler warnings.
|
||||
|
||||
2020-05-09 Fred Kiefer <fredkiefer@gmx.de>
|
||||
|
||||
* Tests/base/NSLocale/general.m: Mark more tests that depend on
|
||||
|
|
|
@ -22,10 +22,11 @@
|
|||
Boston, MA 02110 USA.
|
||||
*/
|
||||
|
||||
#include <Foundation/NSISO8601DateFormatter.h>
|
||||
#include <Foundation/NSDateFormatter.h>
|
||||
#include <Foundation/NSTimeZone.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#import "Foundation/NSCoder.h"
|
||||
#import "Foundation/NSDateFormatter.h"
|
||||
#import "Foundation/NSISO8601DateFormatter.h"
|
||||
#import "Foundation/NSString.h"
|
||||
#import "Foundation/NSTimeZone.h"
|
||||
|
||||
@implementation NSISO8601DateFormatter
|
||||
|
||||
|
@ -41,11 +42,11 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (oneway void) release
|
||||
- (oneway void) dealloc
|
||||
{
|
||||
RELEASE(_formatter);
|
||||
RELEASE(_timeZone);
|
||||
[super release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSTimeZone *) timeZone
|
||||
|
@ -164,5 +165,36 @@
|
|||
return [formatter stringFromDate: date];
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: _timeZone forKey: @"NS.timeZone"];
|
||||
[coder encodeInteger: _formatOptions forKey: @"NS.formatOptions"];
|
||||
}
|
||||
else
|
||||
{
|
||||
[coder encodeObject: _timeZone];
|
||||
[coder encodeValueOfObjCType: @encode(NSUInteger) at: &_formatOptions];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder *)decoder
|
||||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
if ([decoder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(_timeZone, [decoder decodeObjectForKey: @"NS.timeZone"]);
|
||||
_formatOptions = [decoder decodeIntegerForKey: @"NS.formatOptions"];
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSIGN(_timeZone, [decoder decodeObject]);
|
||||
[decoder decodeValueOfObjCType: @encode(NSUInteger) at: &_formatOptions];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -22,7 +22,10 @@
|
|||
Boston, MA 02110 USA.
|
||||
*/
|
||||
|
||||
#include <Foundation/NSOrthography.h>
|
||||
#import "Foundation/NSArray.h"
|
||||
#import "Foundation/NSDictionary.h"
|
||||
#import "Foundation/NSOrthography.h"
|
||||
#import "Foundation/NSString.h"
|
||||
|
||||
@implementation NSOrthography
|
||||
|
||||
|
@ -38,11 +41,11 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (oneway void) release
|
||||
- (oneway void) dealloc
|
||||
{
|
||||
RELEASE(_dominantScript);
|
||||
RELEASE(_languageMap);
|
||||
[super release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *) dominantScript
|
||||
|
|
Loading…
Reference in a new issue