Codechange: Remove min/max functions in favour of STL variants (#8502)
This commit is contained in:
@@ -575,7 +575,7 @@ public:
|
||||
}
|
||||
|
||||
case WID_NCL_MATRIX:
|
||||
resize->height = max(this->checkbox_size.height, (uint)FONT_HEIGHT_NORMAL) + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
resize->height = std::max(this->checkbox_size.height, (uint)FONT_HEIGHT_NORMAL) + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
size->height = 10 * resize->height;
|
||||
break;
|
||||
}
|
||||
@@ -626,7 +626,7 @@ public:
|
||||
const NWidgetBase *nwi_name = this->GetWidget<NWidgetBase>(WID_NCL_NAME);
|
||||
const NWidgetBase *nwi_type = this->GetWidget<NWidgetBase>(WID_NCL_TYPE);
|
||||
|
||||
int line_height = max(this->checkbox_size.height, (uint)FONT_HEIGHT_NORMAL);
|
||||
int line_height = std::max(this->checkbox_size.height, (uint)FONT_HEIGHT_NORMAL);
|
||||
|
||||
/* Fill the matrix with the information */
|
||||
int sprite_y_offset = WD_MATRIX_TOP + (line_height - this->checkbox_size.height) / 2 - 1;
|
||||
@@ -877,7 +877,7 @@ public:
|
||||
break;
|
||||
case WKC_PAGEDOWN:
|
||||
/* scroll down a page */
|
||||
this->list_pos = min(this->list_pos + this->vscroll->GetCapacity(), (int)this->content.size() - 1);
|
||||
this->list_pos = std::min(this->list_pos + this->vscroll->GetCapacity(), (int)this->content.size() - 1);
|
||||
break;
|
||||
case WKC_HOME:
|
||||
/* jump to beginning */
|
||||
|
Reference in New Issue
Block a user