Skip to content

Commit 3f045c3

Browse files
committed
---
yaml --- r: 46354 b: refs/heads/auto c: a01ef8e h: refs/heads/master v: v3
1 parent 95e00dc commit 3f045c3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 91fae2791292c7374143e82814a375a12bfd4e83
17+
refs/heads/auto: a01ef8ef87d9697307c5d4fec4d1fa1ede0d65ae

branches/auto/src/libstd/bitv.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ use core::vec;
1616

1717
struct SmallBitv {
1818
/// only the lowest nbits of this value are used. the rest is undefined.
19-
bits: u32
19+
bits: uint
2020
}
2121

2222
/// a mask that has a 1 for each defined bit in a small_bitv, assuming n bits
2323
#[inline(always)]
24-
fn small_mask(nbits: uint) -> u32 {
24+
fn small_mask(nbits: uint) -> uint {
2525
(1 << nbits) - 1
2626
}
2727

2828
impl SmallBitv {
29-
static fn new(bits: u32) -> SmallBitv {
29+
static fn new(bits: uint) -> SmallBitv {
3030
SmallBitv {bits: bits}
3131
}
3232

3333
#[inline(always)]
34-
fn bits_op(&mut self, right_bits: u32, nbits: uint,
35-
f: fn(u32, u32) -> u32) -> bool {
34+
fn bits_op(&mut self, right_bits: uint, nbits: uint,
35+
f: fn(uint, uint) -> uint) -> bool {
3636
let mask = small_mask(nbits);
37-
let old_b: u32 = self.bits;
37+
let old_b: uint = self.bits;
3838
let new_b = f(old_b, right_bits);
3939
self.bits = new_b;
4040
mask & old_b != mask & new_b
@@ -71,7 +71,7 @@ impl SmallBitv {
7171
self.bits |= 1<<i;
7272
}
7373
else {
74-
self.bits &= !(1<<i as u32);
74+
self.bits &= !(1<<i as uint);
7575
}
7676
}
7777

@@ -259,7 +259,7 @@ priv impl Bitv {
259259
260260
impl Bitv {
261261
static fn new(nbits: uint, init: bool) -> Bitv {
262-
let rep = if nbits <= 32 {
262+
let rep = if nbits <= uint::bits {
263263
Small(~SmallBitv::new(if init {!0} else {0}))
264264
}
265265
else {

0 commit comments

Comments
 (0)