Changeset - r21705:f9ca7c863088
[Not reviewed]
master
0 1 0
alberth - 10 years ago 2014-09-18 19:50:41
alberth@openttd.org
(svn r26848) -Codechange: Unduplicate summing of cargo capacities in GetTotalCapacityOfArticulatedParts.
1 file changed with 1 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/engine_gui.cpp
Show inline comments
 
@@ -142,14 +142,8 @@ void ShowEnginePreviewWindow(EngineID en
 
 */
 
uint GetTotalCapacityOfArticulatedParts(EngineID engine)
 
{
 
	uint total = 0;
 

	
 
	CargoArray cap = GetCapacityOfArticulatedParts(engine);
 
	for (CargoID c = 0; c < NUM_CARGO; c++) {
 
		total += cap[c];
 
	}
 

	
 
	return total;
 
	return cap.GetSum<uint>();
 
}
 

	
 
static StringID GetTrainEngineInfoString(const Engine *e)
0 comments (0 inline, 0 general)