diff options
author | rubidium <rubidium@openttd.org> | 2007-09-01 08:31:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-01 08:31:36 +0000 |
commit | 6f76bc2449d8296b4380e218be7b071dd14cb22c (patch) | |
tree | 6358623fdcb900c9c4bcb968c9388b48c33f1cb5 /src/roadveh_cmd.cpp | |
parent | 766d6d420ef2d9f5565df2e5cea9b37614297708 (diff) | |
download | openttd-6f76bc2449d8296b4380e218be7b071dd14cb22c.tar.xz |
(svn r11031) -Codechange: reduce the amount of duplication of bit counting functions. Based on patches by skidd13, SmatZ and Belugas.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 137ecd77e..4869ed714 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1083,7 +1083,7 @@ static void RoadZPosAffectSpeed(Vehicle *v, byte old_z) static int PickRandomBit(uint bits) { uint i; - uint num = RandomRange(CountBitsSet(bits)); + uint num = RandomRange(COUNTBITS(bits)); for (i = 0; !(bits & 1) || (int)--num >= 0; bits >>= 1, i++) {} return i; |