|
@@ -31,7 +31,7 @@ extension UInt32 {
|
|
|
extension UInt32 {
|
|
|
|
|
|
/** Shift bits to the left. All bits are shifted (including sign bit) */
|
|
|
- fileprivate mutating func shiftLeft(by count: UInt32) {
|
|
|
+ mutating func shiftLeft(by count: UInt32) {
|
|
|
if (self == 0) {
|
|
|
return
|
|
|
}
|
|
@@ -57,7 +57,7 @@ extension UInt32 {
|
|
|
}
|
|
|
|
|
|
/** Shift bits to the right. All bits are shifted (including sign bit) */
|
|
|
- fileprivate mutating func shiftRight(by count: UInt32) {
|
|
|
+ mutating func shiftRight(by count: UInt32) {
|
|
|
if (self == 0) {
|
|
|
return
|
|
|
}
|
|
@@ -85,12 +85,12 @@ extension UInt32 {
|
|
|
}
|
|
|
|
|
|
/** shift left and assign with bits truncation */
|
|
|
-public func &<<= (lhs: inout UInt32, rhs: UInt32) {
|
|
|
+func &<<= (lhs: inout UInt32, rhs: UInt32) {
|
|
|
lhs.shiftLeft(by: rhs)
|
|
|
}
|
|
|
|
|
|
/** shift left with bits truncation */
|
|
|
-public func &<< (lhs: UInt32, rhs: UInt32) -> UInt32 {
|
|
|
+func &<< (lhs: UInt32, rhs: UInt32) -> UInt32 {
|
|
|
var l = lhs;
|
|
|
l.shiftLeft(by: rhs)
|
|
|
return l
|