File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -3374,7 +3374,9 @@ public struct DoubleWidth<Base : FixedWidthInteger> :
3374
3374
let result = DoubleWidth ( extendingOrTruncating: product)
3375
3375
3376
3376
let isNegative = ( self < ( 0 as DoubleWidth ) ) != ( rhs < ( 0 as DoubleWidth ) )
3377
- let didCarry = isNegative ? carry != ~ ( 0 as DoubleWidth ) : carry != ( 0 as DoubleWidth )
3377
+ let didCarry = isNegative
3378
+ ? carry != ~ ( 0 as DoubleWidth )
3379
+ : carry != ( 0 as DoubleWidth )
3378
3380
let hadPositiveOverflow = !isNegative &&
3379
3381
DoubleWidth . isSigned && product. leadingZeroBitCount == 0
3380
3382
@@ -3518,7 +3520,9 @@ public struct DoubleWidth<Base : FixedWidthInteger> :
3518
3520
return
3519
3521
}
3520
3522
3521
- if rhs. _storage. high != 0 || rhs. _storage. low >= DoubleWidth . bitWidth {
3523
+ if rhs. _storage. high != ( 0 as High ) ||
3524
+ rhs. _storage. low >= DoubleWidth . bitWidth
3525
+ {
3522
3526
lhs = 0
3523
3527
return
3524
3528
}
@@ -3548,8 +3552,10 @@ public struct DoubleWidth<Base : FixedWidthInteger> :
3548
3552
3549
3553
// Shift is exactly the width of `Base`, so high -> low.
3550
3554
if rhs. _storage. low == Base . bitWidth {
3551
- lhs = DoubleWidth (
3552
- ( lhs < ( 0 as DoubleWidth ) ? ~ 0 : 0 , Low ( extendingOrTruncating: lhs. _storage. high) ) )
3555
+ lhs = DoubleWidth ( (
3556
+ lhs < ( 0 as DoubleWidth ) ? ~ 0 : 0 ,
3557
+ Low ( extendingOrTruncating: lhs. _storage. high)
3558
+ ) )
3553
3559
return
3554
3560
}
3555
3561
You can’t perform that action at this time.
0 commit comments