mirror of https://github.com/SnapKit/SnapKit
Change += and -= to use inPlace ops and += should be union
This commit is contained in:
parent
c2eae8e90a
commit
ef024cf351
|
@ -157,10 +157,10 @@ internal struct ConstraintAttributes: OptionSetType, BooleanType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
internal func +=(inout left: ConstraintAttributes, right: ConstraintAttributes) {
|
internal func +=(inout left: ConstraintAttributes, right: ConstraintAttributes) {
|
||||||
left = left.intersect(right)
|
left.unionInPlace(right)
|
||||||
}
|
}
|
||||||
internal func -=(inout left: ConstraintAttributes, right: ConstraintAttributes) {
|
internal func -=(inout left: ConstraintAttributes, right: ConstraintAttributes) {
|
||||||
left = left.subtract(right)
|
left.subtractInPlace(right)
|
||||||
}
|
}
|
||||||
internal func ==(left: ConstraintAttributes, right: ConstraintAttributes) -> Bool {
|
internal func ==(left: ConstraintAttributes, right: ConstraintAttributes) -> Bool {
|
||||||
return left.rawValue == right.rawValue
|
return left.rawValue == right.rawValue
|
||||||
|
|
Loading…
Reference in New Issue