(svn r17903) -Codechange: don't get a modifiable NWidget from a const Window

This commit is contained in:
rubidium
2009-10-30 07:51:33 +00:00
parent 87ea1f1dcd
commit 3bc0a4ed3e
3 changed files with 21 additions and 8 deletions

View File

@@ -855,7 +855,7 @@ void Window::DrawSortButtonState(int widget, SortButtonState state) const
top = this->widget[widget].top;
} else {
assert(this->nested_array != NULL);
NWidgetBase *nwid = this->GetWidget<NWidgetBase>(widget);
const NWidgetBase *nwid = this->GetWidget<NWidgetBase>(widget);
base = offset + nwid->pos_x + (_dynlang.text_dir == TD_LTR ? nwid->current_x - WD_SORTBUTTON_ARROW_WIDTH : 0);
top = nwid->pos_y;
}