Codechange: Assign/StoreSizePosition x/y can be negative. (#11416)

AssignSizePosition is used with negative values when an NWidgetMatrix is
scrolled, but they were passed as unsigned and then stored as signed.

Widget pos_x/pos_y were already made signed.
This commit is contained in:
Peter Nelson
2023-11-01 18:44:23 +00:00
committed by GitHub
parent c97120f003
commit bb50cbb772
6 changed files with 22 additions and 22 deletions

View File

@@ -1667,7 +1667,7 @@ public:
this->smallest_y = ComputeMaxSize(min_acs_height, this->smallest_y + this->resize_y - 1, this->resize_y);
}
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl) override
void AssignSizePosition(SizingType sizing, int x, int y, uint given_width, uint given_height, bool rtl) override
{
this->StoreSizePosition(sizing, x, y, given_width, given_height);