Skip to content

Commit e63c5d4

Browse files
committed
Fix warning "static property '...' produces an empty option set"
1 parent 6bae6b2 commit e63c5d4

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Foundation/DateComponentsFormatter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ open class DateComponentsFormatter : Formatter {
2424
public let rawValue : UInt
2525
public init(rawValue: UInt) { self.rawValue = rawValue }
2626

27-
public static let none = ZeroFormattingBehavior(rawValue: 0) //drop none, pad none
27+
public static let none = ZeroFormattingBehavior([]) //drop none, pad none
2828
public static let `default` = ZeroFormattingBehavior(rawValue: 1 << 0) //Positional units: drop leading zeros, pad other zeros. All others: drop all zeros.
2929

3030
public static let dropLeading = ZeroFormattingBehavior(rawValue: 1 << 1) // Off: "0h 10m", On: "10m"

Foundation/NSKeyedArchiver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ open class NSKeyedArchiver : NSCoder {
6666
self.rawValue = rawValue
6767
}
6868

69-
static let none = ArchiverFlags(rawValue: 0)
69+
static let none = ArchiverFlags([])
7070
static let finishedEncoding = ArchiverFlags(rawValue : 1)
7171
static let requiresSecureCoding = ArchiverFlags(rawValue: 2)
7272
}

Foundation/NSKeyedUnarchiver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ open class NSKeyedUnarchiver : NSCoder {
2929
self.rawValue = rawValue
3030
}
3131

32-
static let none = UnarchiverFlags(rawValue: 0)
32+
static let none = UnarchiverFlags([])
3333
static let finishedDecoding = UnarchiverFlags(rawValue : 1 << 0)
3434
static let requiresSecureCoding = UnarchiverFlags(rawValue: 1 << 1)
3535
static let startedDecoding = UnarchiverFlags(rawValue: 1 << 2)

Foundation/NSString.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ extension NSString {
6868
public let rawValue : UInt
6969
public init(rawValue: UInt) { self.rawValue = rawValue }
7070

71-
public static let byLines = EnumerationOptions(rawValue: 0)
71+
public static let byLines = EnumerationOptions([])
7272
public static let byParagraphs = EnumerationOptions(rawValue: 1)
7373
public static let byComposedCharacterSequences = EnumerationOptions(rawValue: 2)
7474

Foundation/NotificationQueue.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extension NotificationQueue {
2121
public let rawValue : UInt
2222
public init(rawValue: UInt) { self.rawValue = rawValue }
2323

24-
public static let none = NotificationCoalescing(rawValue: 0)
24+
public static let none = NotificationCoalescing([])
2525
public static let onName = NotificationCoalescing(rawValue: 1 << 0)
2626
public static let onSender = NotificationCoalescing(rawValue: 1 << 1)
2727
}

0 commit comments

Comments
 (0)