瀏覽代碼

Change += and -= to use inPlace ops and += should be union

Ben Jones 10 年之前
父節點
當前提交
ef024cf351
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/ConstraintAttributes.swift

+ 2 - 2
Source/ConstraintAttributes.swift

@@ -157,10 +157,10 @@ internal struct ConstraintAttributes: OptionSetType, BooleanType {
     }
 }
 internal func +=(inout left: ConstraintAttributes, right: ConstraintAttributes) {
-    left = left.intersect(right)
+    left.unionInPlace(right)
 }
 internal func -=(inout left: ConstraintAttributes, right: ConstraintAttributes) {
-    left = left.subtract(right)
+    left.subtractInPlace(right)
 }
 internal func ==(left: ConstraintAttributes, right: ConstraintAttributes) -> Bool {
     return left.rawValue == right.rawValue