# HG changeset patch # User peter1138 # Date 1183542167 0 # Node ID ca0084d96dbdfc1a863bdac3947fc681b7016f61 # Parent ff42326d2fde933650b954bad0ea74de681f60db (svn r10432) -Codechange: use existing function instead of data duplication diff -r ff42326d2fde -r ca0084d96dbd src/rail_cmd.cpp --- a/src/rail_cmd.cpp Wed Jul 04 09:41:35 2007 +0000 +++ b/src/rail_cmd.cpp Wed Jul 04 09:42:47 2007 +0000 @@ -1641,12 +1641,6 @@ } } -static const DiagDirection _dir_from_track[14] = { - DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_SW, DIAGDIR_SE, DIAGDIR_NE, DIAGDIR_NE, - DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NW, DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NE, -}; - - static void ChangeSignalStates(SetSignalsData *ssd) { int i; @@ -1692,7 +1686,7 @@ if (IsPresignalExit(tile, track)) { if (ssd->cur_stack != NUM_SSD_STACK) { ssd->next_tile[ssd->cur_stack] = tile; - ssd->next_dir[ssd->cur_stack] = _dir_from_track[ssd->bit[i]]; + ssd->next_dir[ssd->cur_stack] = TrackdirToExitdir(ssd->bit[i]); ssd->cur_stack++; } else { DEBUG(misc, 0, "NUM_SSD_STACK too small"); /// @todo WTF is this???