Skip to content

Commit 0b50283

Browse files
authored
More updates for SE-0025 ('fileprivate' and 'private') (#488)
Members satisfying protocol requirements cannot be private, since they are necessarily available to call from outside the type.
1 parent d1a3d80 commit 0b50283

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Foundation/Unit.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private class UnitConverterReciprocal : UnitConverter, NSSecureCoding {
106106
return reciprocal / baseUnitValue
107107
}
108108

109-
private required convenience init?(coder aDecoder: NSCoder) {
109+
fileprivate required convenience init?(coder aDecoder: NSCoder) {
110110
if aDecoder.allowsKeyedCoding {
111111
let reciprocal = aDecoder.decodeDouble(forKey: "NS.reciprocal")
112112
self.init(reciprocal: reciprocal)
@@ -118,15 +118,15 @@ private class UnitConverterReciprocal : UnitConverter, NSSecureCoding {
118118
}
119119
}
120120

121-
private func encode(with aCoder: NSCoder) {
121+
fileprivate func encode(with aCoder: NSCoder) {
122122
if aCoder.allowsKeyedCoding {
123123
aCoder.encode(self.reciprocal, forKey:"NS.reciprocal")
124124
} else {
125125
aCoder.encode(NSNumber(value: self.reciprocal))
126126
}
127127
}
128128

129-
private static func supportsSecureCoding() -> Bool { return true }
129+
fileprivate static func supportsSecureCoding() -> Bool { return true }
130130
}
131131

132132
/*

0 commit comments

Comments
 (0)