diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/editors/interface/interface_template_search_menu.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/editors/interface/interface_template_search_menu.cc')
-rw-r--r-- | source/blender/editors/interface/interface_template_search_menu.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_template_search_menu.cc b/source/blender/editors/interface/interface_template_search_menu.cc index c777b7834f2..f61baf65b58 100644 --- a/source/blender/editors/interface/interface_template_search_menu.cc +++ b/source/blender/editors/interface/interface_template_search_menu.cc @@ -191,7 +191,7 @@ static bool menu_items_from_ui_create_item_from_button(MenuSearch_Data *data, if (drawstr_is_empty) { if (prop_type == PROP_ENUM) { - const int value_enum = (int)but->hardmax; + const int value_enum = int(but->hardmax); EnumPropertyItem enum_item; if (RNA_property_enum_item_from_value_gettexted((bContext *)but->block->evil_C, &but->rnapoin, @@ -227,7 +227,7 @@ static bool menu_items_from_ui_create_item_from_button(MenuSearch_Data *data, item->rna.index = but->rnaindex; if (prop_type == PROP_ENUM) { - item->rna.enum_value = (int)but->hardmax; + item->rna.enum_value = int(but->hardmax); } } } @@ -544,8 +544,8 @@ static MenuSearch_Data *menu_items_from_ui_create( if (wm_contexts[space_type_ui_index].space_type_ui_index != -1) { ScrArea *area_best = wm_contexts[space_type_ui_index].area; - const uint value_best = (uint)area_best->winx * (uint)area_best->winy; - const uint value_test = (uint)area->winx * (uint)area->winy; + const uint value_best = uint(area_best->winx) * uint(area_best->winy); + const uint value_test = uint(area->winx) * uint(area->winy); if (value_best > value_test) { continue; } |