Use TileAreaIterator in CmdConvertRail
commit810cb1770a7c46a7f59a28d47fcd44f83a6aaf1c
authorcirdan <cirdansw@gmail.com>
Mon, 24 Feb 2014 22:49:13 +0000 (24 23:49 +0100)
committercirdan <cirdansw@gmail.com>
Mon, 24 Feb 2014 22:49:13 +0000 (24 23:49 +0100)
tree2ca73db9ea25af8ee07d2a6362eb8e3640d2c4e9
parentf4d3c7114ae3909a66d2d9e26fa3bdd8a8d69071
Use TileAreaIterator in CmdConvertRail

Use the new TileAreaIterator implementations in CmdConvertRail,
so that using a rotated area is encapsulated in one struct, and
no orthogonal tile area is used. This fixes a bug that triggered
an assertion because of mismatched costs between test and exec
runs when converting rail over a rotated area that included a
bridge or tunnel head whose counterpart was also in the area
but not in the (non-rotated) rectangle determined by the area
endpoints.
src/rail_cmd.cpp