(svn r18220) -Codechange: Reduce number of nested widget dynamic casts.

This commit is contained in:
alberth
2009-11-22 13:22:53 +00:00
parent 2332034822
commit bf93372ca2
14 changed files with 48 additions and 42 deletions

View File

@@ -273,7 +273,7 @@ struct CheatWindow : Window {
virtual void OnClick(Point pt, int widget)
{
const NWidgetCore *wid = this->GetWidget<NWidgetCore>(CW_PANEL);
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(CW_PANEL);
uint btn = (pt.y - wid->pos_y - WD_FRAMERECT_TOP - this->header_height) / (FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL);
uint x = pt.x - wid->pos_x;
bool rtl = _dynlang.text_dir == TD_RTL;