Changeset - r20998:c047af70b5bc
[Not reviewed]
master
0 2 0
rubidium - 11 years ago 2013-11-23 18:13:30
rubidium@openttd.org
(svn r26072) -Cleanup: mark some unreachable default cases by NOT_REACHED()
2 files changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_list.cpp
Show inline comments
 
@@ -520,9 +520,7 @@ void ScriptList::Sort(SorterType sorter,
 
			}
 
			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 coun
 
					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()) {
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -680,7 +680,7 @@ CommandCost CmdBuildTunnel(TileIndex sta
 
	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) {
0 comments (0 inline, 0 general)