Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-05-14 19:57:52 +0300
committerHans Goudey <h.goudey@me.com>2022-05-14 19:57:52 +0300
commitea5bfedb4925485192e40cab98f2d5f1d3fe5012 (patch)
treedc1acc6668f86e9a439eea673a76b4f387400c4d /source/blender/render/intern
parente1c8ef551fe2c4393d714822e5e74eb153fc7af2 (diff)
Cleanup: Further use of const for retrieved custom data layers
Similar to cf69652618fefcd22b2cde9a2.
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r--source/blender/render/intern/texture_margin.cc4
-rw-r--r--source/blender/render/intern/texture_pointdensity.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/render/intern/texture_margin.cc b/source/blender/render/intern/texture_margin.cc
index 60585789416..9096936a3ff 100644
--- a/source/blender/render/intern/texture_margin.cc
+++ b/source/blender/render/intern/texture_margin.cc
@@ -508,11 +508,11 @@ static void generate_margin(ImBuf *ibuf,
mloop = me->mloop;
if ((uv_layer == nullptr) || (uv_layer[0] == '\0')) {
- mloopuv = static_cast<MLoopUV const *>(CustomData_get_layer(&me->ldata, CD_MLOOPUV));
+ mloopuv = static_cast<const MLoopUV *>(CustomData_get_layer(&me->ldata, CD_MLOOPUV));
}
else {
int uv_id = CustomData_get_named_layer(&me->ldata, CD_MLOOPUV, uv_layer);
- mloopuv = static_cast<MLoopUV const *>(
+ mloopuv = static_cast<const MLoopUV *>(
CustomData_get_layer_n(&me->ldata, CD_MLOOPUV, uv_id));
}
diff --git a/source/blender/render/intern/texture_pointdensity.c b/source/blender/render/intern/texture_pointdensity.c
index b9721f49ce7..6e0bae700dc 100644
--- a/source/blender/render/intern/texture_pointdensity.c
+++ b/source/blender/render/intern/texture_pointdensity.c
@@ -271,7 +271,6 @@ static void pointdensity_cache_vertex_color(PointDensity *pd,
{
const MLoop *mloop = mesh->mloop;
const int totloop = mesh->totloop;
- const MLoopCol *mcol;
char layername[MAX_CUSTOMDATA_LAYER_NAME];
int i;
@@ -282,7 +281,7 @@ static void pointdensity_cache_vertex_color(PointDensity *pd,
}
CustomData_validate_layer_name(
&mesh->ldata, CD_PROP_BYTE_COLOR, pd->vertex_attribute_name, layername);
- mcol = CustomData_get_layer_named(&mesh->ldata, CD_PROP_BYTE_COLOR, layername);
+ const MLoopCol *mcol = CustomData_get_layer_named(&mesh->ldata, CD_PROP_BYTE_COLOR, layername);
if (!mcol) {
return;
}