Cleanup: replace C-style casts with functional casts for numeric types
Some changes missed from f68cfd6bb0.
This commit is contained in:
@@ -3740,10 +3740,10 @@ static void ui_but_update_ex(uiBut *but, const bool validate)
|
||||
case UI_BTYPE_NUM_SLIDER:
|
||||
if (validate) {
|
||||
UI_GET_BUT_VALUE_INIT(but, value);
|
||||
if (value < (double)but->hardmin) {
|
||||
if (value < double(but->hardmin)) {
|
||||
ui_but_value_set(but, but->hardmin);
|
||||
}
|
||||
else if (value > (double)but->hardmax) {
|
||||
else if (value > double(but->hardmax)) {
|
||||
ui_but_value_set(but, but->hardmax);
|
||||
}
|
||||
|
||||
|
||||
@@ -1583,10 +1583,10 @@ void UI_view2d_smooth_view(const bContext *C,
|
||||
if (changed) {
|
||||
sms.orig_cur = v2d->cur;
|
||||
|
||||
sms.time_allowed = (double)smooth_viewtx / 1000.0;
|
||||
sms.time_allowed = double(smooth_viewtx) / 1000.0;
|
||||
|
||||
/* scale the time allowed the change in view */
|
||||
sms.time_allowed *= (double)fac;
|
||||
sms.time_allowed *= double(fac);
|
||||
|
||||
/* keep track of running timer! */
|
||||
if (v2d->sms == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user