This repository was archived by the owner on Feb 18, 2025. It is now read-only.
File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ impl Int32 {
83
83
@pub @internal fun countOneBits(): Int32 {
84
84
var x = self;
85
85
var c = 0i32;
86
- while ( x != 0i32) {
86
+ while x != 0i32 {
87
87
c = c + 1i32;
88
88
x = x.bitwiseAnd(x.wrappingSub(1i32));
89
89
}
@@ -260,7 +260,7 @@ impl Int64 {
260
260
@pub @internal fun countOneBits(): Int32 {
261
261
var x = self;
262
262
var c = 0i32;
263
- while ( x != 0i64) {
263
+ while x != 0i64 {
264
264
c = c + 1i32;
265
265
x = x.bitwiseAnd(x.wrappingSub(1i64));
266
266
}
@@ -272,7 +272,7 @@ impl Int64 {
272
272
}
273
273
var t = 1i64.shiftLeft(Int64::bits() - 1i32);
274
274
var r = 0i32;
275
- while ( self.bitwiseAnd(t) ) == 0i64 {
275
+ while self.bitwiseAnd(t) == 0i64 {
276
276
t = t.shiftRight(1i32);
277
277
r = r + 1i32;
278
278
}
@@ -285,7 +285,7 @@ impl Int64 {
285
285
}
286
286
var t = 1i64;
287
287
var r = 0i32;
288
- while ( self.bitwiseAnd(t) ) == 0i64 {
288
+ while self.bitwiseAnd(t) == 0i64 {
289
289
t = t.shiftLeft(1i32);
290
290
r = r + 1i32
291
291
}
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ impl String {
175
175
let bits = bits.toInt64();
176
176
let array = Array[UInt8]::zero(bits);
177
177
var at = array.size() - 1;
178
- while ( at >= 0) {
178
+ while at >= 0 {
179
179
array(bits - 1 - at) = (('0'.toInt64()) + (data.shiftRight(at.toInt32()) & 1)).toUInt8();
180
180
at = at - 1;
181
181
}
You can’t perform that action at this time.
0 commit comments