Codechange: Pass by reference to UpdateWidgetSize. (#12457)
These parameters are always provided and not optional.
This commit is contained in:
@@ -836,12 +836,12 @@ public:
|
||||
this->OnInvalidateData(VIWD_MODIFY_ORDERS);
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(WidgetID widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_O_ORDER_LIST:
|
||||
resize->height = GetCharacterHeight(FS_NORMAL);
|
||||
size->height = 6 * resize->height + padding.height;
|
||||
resize.height = GetCharacterHeight(FS_NORMAL);
|
||||
size.height = 6 * resize.height + padding.height;
|
||||
break;
|
||||
|
||||
case WID_O_COND_VARIABLE: {
|
||||
@@ -851,7 +851,7 @@ public:
|
||||
}
|
||||
d.width += padding.width;
|
||||
d.height += padding.height;
|
||||
*size = maxdim(*size, d);
|
||||
size = maxdim(size, d);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ public:
|
||||
}
|
||||
d.width += padding.width;
|
||||
d.height += padding.height;
|
||||
*size = maxdim(*size, d);
|
||||
size = maxdim(size, d);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user