Changeset - r20366:e4bf96e7e74d
[Not reviewed]
master
0 1 0
fonsinchen - 11 years ago 2013-06-09 14:10:33
fonsinchen@openttd.org
(svn r25379) -Fix: avoid warning in FlowStatMap::FinalizeLocalConsumption
1 file changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -4173,8 +4173,13 @@ void FlowStatMap::FinalizeLocalConsumpti
 
	for (FlowStatMap::iterator i = this->begin(); i != this->end(); ++i) {
 
		FlowStat &fs = i->second;
 
		uint local = fs.GetShare(INVALID_STATION);
 
		fs.ChangeShare(self, -local);
 
		fs.ChangeShare(INVALID_STATION, -local);
 
		if (local > INT_MAX) { // make sure it fits in an int
 
			fs.ChangeShare(self, -INT_MAX);
 
			fs.ChangeShare(INVALID_STATION, -INT_MAX);
 
			local -= INT_MAX;
 
		}
 
		fs.ChangeShare(self, (int)-local);
 
		fs.ChangeShare(INVALID_STATION, (int)-local);
 

	
 
		/* If the local share is used up there must be a share for some
 
		 * remote station. */
0 comments (0 inline, 0 general)