Cleanup: widget pos_x/y are already int. (#10809)

Remove old casts left over from when pos_x/y were unsigned.
This commit is contained in:
2023-05-12 18:02:51 +01:00
committed by GitHub
parent 7e3646cf46
commit da7f431812
3 changed files with 7 additions and 7 deletions

View File

@@ -2314,7 +2314,7 @@ struct GameSettingsWindow : Window {
this->closing_dropdown = false;
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_GS_OPTIONSPANEL);
int rel_y = (pt.y - (int)wid->pos_y - WidgetDimensions::scaled.framerect.top) % wid->resize_y;
int rel_y = (pt.y - wid->pos_y - WidgetDimensions::scaled.framerect.top) % wid->resize_y;
Rect wi_rect;
wi_rect.left = pt.x - (_current_text_dir == TD_RTL ? SETTING_BUTTON_WIDTH - 1 - x : x);