diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-26 02:53:49 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-26 02:53:49 +0300 |
commit | 15f3cf7f8f956a6372b6a99788b622946ba3d1e5 (patch) | |
tree | 0ad4fe0aeb21ea4773088b0c92cc7bcb48d5e2a5 /source/blender/blenkernel/intern | |
parent | e746999aa937f6de638a339d52e1f2e494014919 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/icons.cc | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/icons.cc b/source/blender/blenkernel/intern/icons.cc index 82023c23ca5..dc1d23de7e0 100644 --- a/source/blender/blenkernel/intern/icons.cc +++ b/source/blender/blenkernel/intern/icons.cc @@ -971,8 +971,8 @@ struct Icon_Geom *BKE_icon_geom_from_memory(uchar *data, size_t data_len) p += 4; struct Icon_Geom *geom = (struct Icon_Geom *)MEM_mallocN(sizeof(*geom), __func__); - geom->coords_range[0] = (int)*p++; - geom->coords_range[1] = (int)*p++; + geom->coords_range[0] = int(*p++); + geom->coords_range[1] = int(*p++); /* x, y ignored for now */ p += 2; diff --git a/source/blender/blenkernel/intern/scene.cc b/source/blender/blenkernel/intern/scene.cc index 7959ab845e8..6d10d31e976 100644 --- a/source/blender/blenkernel/intern/scene.cc +++ b/source/blender/blenkernel/intern/scene.cc @@ -159,8 +159,8 @@ static void scene_init_data(ID *id) scene->unit.length_unit = uchar(BKE_unit_base_of_type_get(USER_UNIT_METRIC, B_UNIT_LENGTH)); scene->unit.mass_unit = uchar(BKE_unit_base_of_type_get(USER_UNIT_METRIC, B_UNIT_MASS)); scene->unit.time_unit = uchar(BKE_unit_base_of_type_get(USER_UNIT_METRIC, B_UNIT_TIME)); - scene->unit.temperature_unit = (uchar)BKE_unit_base_of_type_get(USER_UNIT_METRIC, - B_UNIT_TEMPERATURE); + scene->unit.temperature_unit = uchar( + BKE_unit_base_of_type_get(USER_UNIT_METRIC, B_UNIT_TEMPERATURE)); /* Anti-Aliasing threshold. */ scene->grease_pencil_settings.smaa_threshold = 1.0f; |