Skip to content

Commit b065549

Browse files
author
Robert F. Dickerson
committed
NSXMLDocument and NSDictionary changes because of NSDate API changes
1 parent 27086b1 commit b065549

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Foundation/NSDictionary.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ public class NSDictionary : NSObject, NSCopying, NSMutableCopying, NSSecureCodin
378378
if key is NSArray {
379379
line += (key as! NSArray).descriptionWithLocale(locale, indent: level + 1)
380380
} else if key is NSDate {
381-
line += (key as! NSDate).descriptionWithLocale(locale)
381+
line += (key as! NSDate).description(locale)
382382
} else if key is NSDecimalNumber {
383383
line += (key as! NSDecimalNumber).descriptionWithLocale(locale)
384384
} else if key is NSDictionary {
@@ -397,7 +397,7 @@ public class NSDictionary : NSObject, NSCopying, NSMutableCopying, NSSecureCodin
397397
if object is NSArray {
398398
line += (object as! NSArray).descriptionWithLocale(locale, indent: level + 1)
399399
} else if object is NSDate {
400-
line += (object as! NSDate).descriptionWithLocale(locale)
400+
line += (object as! NSDate).description(locale)
401401
} else if object is NSDecimalNumber {
402402
line += (object as! NSDecimalNumber).descriptionWithLocale(locale)
403403
} else if object is NSDictionary {

Foundation/NSXMLDocument.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class NSXMLDocument : NSXMLNode {
6161
@abstract Returns a document created from either XML or HTML, if the HTMLTidy option is set. Parse errors are returned in <tt>error</tt>.
6262
*/
6363
public convenience init(XMLString string: String, options mask: Int) throws {
64-
guard let data = string._bridgeToObject().dataUsingEncoding(NSUTF8StringEncoding) else {
64+
guard let data = string._bridgeToObject().data(NSUTF8StringEncoding) else {
6565
// TODO: Throw an error
6666
fatalError("String: '\(string)' could not be converted to NSData using UTF-8 encoding")
6767
}
@@ -311,7 +311,7 @@ public class NSXMLDocument : NSXMLNode {
311311
let string = XMLStringWithOptions(options)
312312
// TODO: support encodings other than UTF-8
313313

314-
return string._bridgeToObject().dataUsingEncoding(NSUTF8StringEncoding) ?? NSData()
314+
return string._bridgeToObject().data(NSUTF8StringEncoding) ?? NSData()
315315
}
316316

317317
/*!

0 commit comments

Comments
 (0)