[Bf-blender-cvs] [8aefc89f43e] refactor-mesh-bevel-weight-generic: Cleanup: Add casts
Hans Goudey
noreply at git.blender.org
Sun May 29 14:43:56 CEST 2022
Commit: 8aefc89f43eb475ab5292c3973ad494bf5915e0d
Author: Hans Goudey
Date: Sun May 29 14:43:45 2022 +0200
Branches: refactor-mesh-bevel-weight-generic
https://developer.blender.org/rB8aefc89f43eb475ab5292c3973ad494bf5915e0d
Cleanup: Add casts
===================================================================
M source/blender/editors/mesh/mesh_data.cc
===================================================================
diff --git a/source/blender/editors/mesh/mesh_data.cc b/source/blender/editors/mesh/mesh_data.cc
index b8ed8e1f58b..bd2ac8d05af 100644
--- a/source/blender/editors/mesh/mesh_data.cc
+++ b/source/blender/editors/mesh/mesh_data.cc
@@ -1111,7 +1111,7 @@ static int mesh_customdata_bevel_weight_vertex_state(bContext *C)
const Object *object = ED_object_context(C);
if (object && object->type == OB_MESH) {
- const Mesh *mesh = object->data;
+ const Mesh *mesh = static_cast<Mesh *>(object->data);
if (!ID_IS_LINKED(mesh)) {
const CustomData *data = GET_CD_DATA(mesh, vdata);
return CustomData_has_layer(data, CD_BWEIGHT);
@@ -1168,12 +1168,12 @@ void MESH_OT_customdata_bevel_weight_vertex_clear(wmOperatorType *ot)
static int mesh_customdata_bevel_weight_edge_state(bContext *C)
{
- Object *ob = ED_object_context(C);
+ const Object *ob = ED_object_context(C);
if (ob && ob->type == OB_MESH) {
- Mesh *me = ob->data;
- if (!ID_IS_LINKED(me)) {
- CustomData *data = GET_CD_DATA(me, edata);
+ const Mesh *mesh = static_cast<Mesh *>(ob->data);
+ if (!ID_IS_LINKED(mesh)) {
+ const CustomData *data = GET_CD_DATA(mesh, edata);
return CustomData_has_layer(data, CD_BWEIGHT);
}
}
More information about the Bf-blender-cvs
mailing list