diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-14 19:57:52 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-14 19:57:52 +0300 |
commit | ea5bfedb4925485192e40cab98f2d5f1d3fe5012 (patch) | |
tree | dc1acc6668f86e9a439eea673a76b4f387400c4d /source/blender/draw/intern/mesh_extractors | |
parent | e1c8ef551fe2c4393d714822e5e74eb153fc7af2 (diff) |
Cleanup: Further use of const for retrieved custom data layers
Similar to cf69652618fefcd22b2cde9a2.
Diffstat (limited to 'source/blender/draw/intern/mesh_extractors')
-rw-r--r-- | source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc index f9e58709c6e..d275b672366 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc @@ -180,7 +180,7 @@ static void fill_vertbuf_with_attribute(const MeshRenderData *mr, const MPoly *mpoly = mr->mpoly; const MLoop *mloop = mr->mloop; - const AttributeType *attr_data = static_cast<AttributeType *>( + const AttributeType *attr_data = static_cast<const AttributeType *>( CustomData_get_layer_n(custom_data, request.cd_type, layer_index)); using converter = attribute_type_converter<AttributeType, VBOType>; diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc index 5fb4b401ae3..2808a0a3a71 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc @@ -108,7 +108,8 @@ static void extract_uv_init(const MeshRenderData *mr, } } else { - MLoopUV *layer_data = (MLoopUV *)CustomData_get_layer_n(cd_ldata, CD_MLOOPUV, i); + const MLoopUV *layer_data = (const MLoopUV *)CustomData_get_layer_n( + cd_ldata, CD_MLOOPUV, i); for (int ml_index = 0; ml_index < mr->loop_len; ml_index++, uv_data++, layer_data++) { memcpy(uv_data, layer_data->uv, sizeof(*uv_data)); } |