mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 07:21:53 +00:00
(svn r26072) -Cleanup: mark some unreachable default cases by NOT_REACHED()
This commit is contained in:
parent
729d64d8d9
commit
be6b64f4e6
@ -520,9 +520,7 @@ void ScriptList::Sort(SorterType sorter, bool ascending)
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
this->Sort(SORT_BY_ITEM, false);
|
||||
return;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
this->sorter_type = sorter;
|
||||
this->sort_ascending = ascending;
|
||||
@ -641,6 +639,7 @@ void ScriptList::RemoveBottom(int32 count)
|
||||
if (--size == 0) break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SORT_BY_ITEM:
|
||||
for (ScriptListMap::reverse_iterator iter = this->items.rbegin(); iter != this->items.rend(); iter = this->items.rbegin()) {
|
||||
|
@ -680,7 +680,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
|
||||
switch (transport_type) {
|
||||
case TRANSPORT_ROAD: cost.AddCost((tiles + 2) * _price[PR_BUILD_ROAD] * 2); break;
|
||||
case TRANSPORT_RAIL: cost.AddCost((tiles + 2) * RailBuildCost(railtype)); break;
|
||||
default: break;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
|
Loading…
Reference in New Issue
Block a user