diff options
author | KUDr <KUDr@openttd.org> | 2007-02-23 20:51:10 +0000 |
---|---|---|
committer | KUDr <KUDr@openttd.org> | 2007-02-23 20:51:10 +0000 |
commit | 8001ab69fbb26b765f0f66858b409f89da74bdf8 (patch) | |
tree | 6dc21c8c3b658f5fb2325b6c1f23ae7184195c99 /src/rail_cmd.cpp | |
parent | c924185f9771d2cbc7078e605bcb6e0e0dd7a079 (diff) | |
download | openttd-8001ab69fbb26b765f0f66858b409f89da74bdf8.tar.xz |
(svn r8864) -Codechange: make ClrBitT(), SetBitT() and ToggleBitT more like CLRBIT() and so on (modify value of the first parameter instead or returning the result)
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 18eb0f1d0..437d19463 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -450,7 +450,7 @@ static int32 ValidateAutoDrag(Trackdir *trackdir, TileIndex start, TileIndex end (trdy >= 0 && dy < 0) ) { if (!HASBIT(*trackdir, 3)) { // first direction is invalid, try the other - *trackdir = SetBitT(*trackdir, 3); // reverse the direction + SetBitT(*trackdir, 3); // reverse the direction trdx = -trdx; trdy = -trdy; } else { // other direction is invalid too, invalid drag @@ -513,7 +513,7 @@ static int32 CmdRailTrackHelper(TileIndex tile, uint32 flags, uint32 p1, uint32 tile += ToTileIndexDiff(_trackdelta[trackdir]); // toggle railbit for the non-diagonal tracks - if (!IsDiagonalTrackdir(trackdir)) trackdir = ToggleBitT(trackdir, 0); + if (!IsDiagonalTrackdir(trackdir)) ToggleBitT(trackdir, 0); } return (total_cost == 0) ? CMD_ERROR : total_cost; @@ -777,7 +777,7 @@ static int32 CmdSignalTrackHelper(TileIndex tile, uint32 flags, uint32 p1, uint3 signal_ctr++; // toggle railbit for the non-diagonal tracks (|, -- tracks) - if (!IsDiagonalTrackdir(trackdir)) trackdir = ToggleBitT(trackdir, 0); + if (!IsDiagonalTrackdir(trackdir)) ToggleBitT(trackdir, 0); } return error ? CMD_ERROR : total_cost; |