(svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.

-Cleanup: replace some magic '1920' values with BASE_YEAR.
This commit is contained in:
rubidium
2006-08-15 15:18:03 +00:00
parent 8aa76f306d
commit 0d3ccad29f
19 changed files with 38 additions and 38 deletions

View File

@@ -1185,7 +1185,7 @@ static void CustCurrencyWndProc(Window *w, WindowEvent *e)
WP(w,def_d).data_1 = (1 << (line * 2 + 0));
} else {
_custom_currency.to_euro =
clamp(_custom_currency.to_euro + 1, 2000, MAX_YEAR_END_REAL);
clamp(_custom_currency.to_euro + 1, 2000, MAX_YEAR);
WP(w,def_d).data_1 = (1 << (line * 2 + 1));
}
} else { // enter text
@@ -1237,7 +1237,7 @@ static void CustCurrencyWndProc(Window *w, WindowEvent *e)
case 4: /* Year to switch to euro */
val = atoi(b);
val = clamp(val, 1999, MAX_YEAR_END_REAL);
val = clamp(val, 1999, MAX_YEAR);
if (val == 1999) val = 0;
_custom_currency.to_euro = val;
break;