File tree 1 file changed +19
-13
lines changed
1 file changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -74,9 +74,10 @@ extension CGPoint: NSSpecialValueCoding {
74
74
return false
75
75
}
76
76
}
77
-
78
- var hash : Int {
79
- return self . x. hashValue &+ self . y. hashValue
77
+
78
+ func hash( into hasher: inout Hasher ) {
79
+ hasher. combine ( x)
80
+ hasher. combine ( y)
80
81
}
81
82
82
83
var description : String {
@@ -166,9 +167,10 @@ extension CGSize: NSSpecialValueCoding {
166
167
return false
167
168
}
168
169
}
169
-
170
- var hash : Int {
171
- return self . width. hashValue &+ self . height. hashValue
170
+
171
+ func hash( into hasher: inout Hasher ) {
172
+ hasher. combine ( width)
173
+ hasher. combine ( height)
172
174
}
173
175
174
176
var description : String {
@@ -488,11 +490,12 @@ extension CGRect: NSSpecialValueCoding {
488
490
return false
489
491
}
490
492
}
491
-
492
- var hash : Int {
493
- return self . origin. hash &+ self . size. hash
493
+
494
+ func hash( into hasher: inout Hasher ) {
495
+ origin. hash ( into: & hasher)
496
+ size. hash ( into: & hasher)
494
497
}
495
-
498
+
496
499
var description : String {
497
500
return NSStringFromRect ( self )
498
501
}
@@ -588,9 +591,12 @@ extension NSEdgeInsets: NSSpecialValueCoding {
588
591
return false
589
592
}
590
593
}
591
-
592
- var hash : Int {
593
- return self . top. hashValue &+ self . left. hashValue &+ self . bottom. hashValue &+ self . right. hashValue
594
+
595
+ func hash( into hasher: inout Hasher ) {
596
+ hasher. combine ( top)
597
+ hasher. combine ( left)
598
+ hasher. combine ( bottom)
599
+ hasher. combine ( right)
594
600
}
595
601
596
602
var description : String {
You can’t perform that action at this time.
0 commit comments