Cleanup: replace C-style casts with functional casts for numeric types
Use function style casts in C++ headers & source.
This commit is contained in:
@@ -3659,10 +3659,10 @@ static void ui_but_build_drawstr_float(uiBut *but, double value)
|
||||
/* Change negative zero to regular zero, without altering anything else. */
|
||||
value += +0.0f;
|
||||
|
||||
if (value == (double)FLT_MAX) {
|
||||
if (value == double(FLT_MAX)) {
|
||||
STR_CONCAT(but->drawstr, slen, "inf");
|
||||
}
|
||||
else if (value == (double)-FLT_MAX) {
|
||||
else if (value == double(-FLT_MAX)) {
|
||||
STR_CONCAT(but->drawstr, slen, "-inf");
|
||||
}
|
||||
else if (subtype == PROP_PERCENTAGE) {
|
||||
|
||||
@@ -1396,8 +1396,7 @@ ARegion *UI_tooltip_create_from_gizmo(bContext *C, wmGizmo *gz)
|
||||
{
|
||||
wmWindow *win = CTX_wm_window(C);
|
||||
const float aspect = 1.0f;
|
||||
float init_position[2] = {static_cast<float>(win->eventstate->xy[0]),
|
||||
static_cast<float>(win->eventstate->xy[1])};
|
||||
float init_position[2] = {float(win->eventstate->xy[0]), float(win->eventstate->xy[1])};
|
||||
|
||||
uiTooltipData *data = ui_tooltip_data_from_gizmo(C, gz);
|
||||
if (data == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user