File diff r27871:5fa5d936a679 → r27872:bb4e800961d7
src/company_cmd.cpp
Show inline comments
 
@@ -750,8 +750,9 @@ static IntervalTimer<TimerGameCalendar> 
 
{
 
	/* Copy statistics */
 
	for (Company *c : Company::Iterate()) {
 
		memmove(&c->yearly_expenses[1], &c->yearly_expenses[0], sizeof(c->yearly_expenses) - sizeof(c->yearly_expenses[0]));
 
		memset(&c->yearly_expenses[0], 0, sizeof(c->yearly_expenses[0]));
 
		/* Move expenses to previous years. */
 
		std::rotate(std::rbegin(c->yearly_expenses), std::rbegin(c->yearly_expenses) + 1, std::rend(c->yearly_expenses));
 
		c->yearly_expenses[0] = {};
 
		SetWindowDirty(WC_FINANCES, c->index);
 
	}