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/space_outliner/outliner_edit.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.cc')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.cc b/source/blender/editors/space_outliner/outliner_edit.cc index be3c1547579..7a66644b5a8 100644 --- a/source/blender/editors/space_outliner/outliner_edit.cc +++ b/source/blender/editors/space_outliner/outliner_edit.cc @@ -596,7 +596,7 @@ static int outliner_id_remap_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); - const short id_type = (short)RNA_enum_get(op->ptr, "id_type"); + const short id_type = short(RNA_enum_get(op->ptr, "id_type")); ID *old_id = static_cast<ID *>( BLI_findlink(which_libbase(CTX_data_main(C), id_type), RNA_enum_get(op->ptr, "old_id"))); ID *new_id = static_cast<ID *>( @@ -692,7 +692,7 @@ static const EnumPropertyItem *outliner_id_itemf(bContext *C, int totitem = 0; int i = 0; - short id_type = (short)RNA_enum_get(ptr, "id_type"); + short id_type = short(RNA_enum_get(ptr, "id_type")); ID *id = static_cast<ID *>(which_libbase(CTX_data_main(C), id_type)->first); for (; id; id = static_cast<ID *>(id->next)) { @@ -1233,12 +1233,12 @@ void OUTLINER_OT_select_all(wmOperatorType *ot) void outliner_set_coordinates(const ARegion *region, const SpaceOutliner *space_outliner) { - int starty = (int)(region->v2d.tot.ymax) - UI_UNIT_Y; + int starty = int(region->v2d.tot.ymax) - UI_UNIT_Y; tree_iterator::all_open(*space_outliner, [&](TreeElement *te) { /* store coord and continue, we need coordinates for elements outside view too */ te->xs = 0; - te->ys = (float)starty; + te->ys = float(starty); starty -= UI_UNIT_Y; }); } |