Skip to content

Commit 2f92aef

Browse files
committed
fix bracket formatting
1 parent a295334 commit 2f92aef

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

Bit Set/BitSet.playground/Contents.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ z.all1() // false
9393
var smallBitSet = BitSet(size: 16)
9494
smallBitSet[5] = true
9595
smallBitSet[10] = true
96-
print( smallBitSet >> 3 )
97-
print( smallBitSet << 6 ) // one bit shifts off the end
96+
print(smallBitSet >> 3)
97+
print(smallBitSet << 6) // one bit shifts off the end
9898

9999
var bigBitSet = BitSet( size: 120 )
100100
bigBitSet[1] = true
@@ -104,8 +104,8 @@ bigBitSet[32] = true
104104
bigBitSet[55] = true
105105
bigBitSet[64] = true
106106
bigBitSet[80] = true
107-
print( bigBitSet )
108-
print( bigBitSet << 32 )
109-
print( bigBitSet << 64 )
110-
print( bigBitSet >> 32 )
111-
print( bigBitSet >> 64 )
107+
print(bigBitSet)
108+
print(bigBitSet << 32)
109+
print(bigBitSet << 64)
110+
print(bigBitSet >> 32)
111+
print(bigBitSet >> 64)

Bit Set/BitSet.playground/Sources/BitSet.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ public func << (lhs: BitSet, numBitsLeft: Int) -> BitSet {
235235
let shift = numBitsLeft % lhs.N
236236
for i in 0..<lhs.words.count {
237237
out.words[i] = 0
238-
if( i - offset >= 0 ) {
238+
if (i - offset >= 0) {
239239
out.words[i] = lhs.words[i - offset] << shift
240240
}
241-
if( i - offset - 1 >= 0 ) {
241+
if (i - offset - 1 >= 0) {
242242
out.words[i] |= lhs.words[i - offset - 1] >> (lhs.N - shift)
243243
}
244244
}
@@ -253,10 +253,10 @@ public func >> (lhs: BitSet, numBitsRight: Int) -> BitSet {
253253
let shift = numBitsRight % lhs.N
254254
for i in 0..<lhs.words.count {
255255
out.words[i] = 0
256-
if( i + offset < lhs.words.count ) {
256+
if (i + offset < lhs.words.count) {
257257
out.words[i] = lhs.words[i + offset] >> shift
258258
}
259-
if( i + offset + 1 < lhs.words.count ) {
259+
if (i + offset + 1 < lhs.words.count) {
260260
out.words[i] |= lhs.words[i + offset + 1] << (lhs.N - shift)
261261
}
262262
}

Bit Set/BitSet.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ public func << (lhs: BitSet, numBitsLeft: Int) -> BitSet {
235235
let shift = numBitsLeft % lhs.N
236236
for i in 0..<lhs.words.count {
237237
out.words[i] = 0
238-
if( i - offset >= 0 ) {
238+
if (i - offset >= 0) {
239239
out.words[i] = lhs.words[i - offset] << shift
240240
}
241-
if( i - offset - 1 >= 0 ) {
241+
if (i - offset - 1 >= 0) {
242242
out.words[i] |= lhs.words[i - offset - 1] >> (lhs.N - shift)
243243
}
244244
}
@@ -253,10 +253,10 @@ public func >> (lhs: BitSet, numBitsRight: Int) -> BitSet {
253253
let shift = numBitsRight % lhs.N
254254
for i in 0..<lhs.words.count {
255255
out.words[i] = 0
256-
if( i + offset < lhs.words.count ) {
256+
if (i + offset < lhs.words.count) {
257257
out.words[i] = lhs.words[i + offset] >> shift
258258
}
259-
if( i + offset + 1 < lhs.words.count ) {
259+
if (i + offset + 1 < lhs.words.count) {
260260
out.words[i] |= lhs.words[i + offset + 1] << (lhs.N - shift)
261261
}
262262
}

0 commit comments

Comments
 (0)