(svn r20951) -Codechange: Add SmallMap::Contains() and use it.

This commit is contained in:
frosch
2010-10-16 20:34:43 +00:00
parent 82d4ffacff
commit 98250ad8da
5 changed files with 16 additions and 5 deletions

View File

@@ -258,7 +258,7 @@ struct NewGRFParametersWindow : public Window {
DrawArrowButtons(buttons_left, y + 2, COLOUR_YELLOW, (this->clicked_button == i) ? 1 + (this->clicked_increase != rtl) : 0, current_value > par_info->min_value, current_value < par_info->max_value);
SetDParam(2, STR_JUST_INT);
SetDParam(3, current_value);
if (par_info->value_names.Find(current_value) != par_info->value_names.End()) {
if (par_info->value_names.Contains(current_value)) {
const char *label = GetGRFStringFromGRFText(par_info->value_names.Find(current_value)->second);
if (label != NULL) {
SetDParam(2, STR_JUST_RAW_STRING);