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:
authorSybren A. Stüvel <sybren@blender.org>2019-07-04 13:04:39 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-07-30 17:59:10 +0300
commite74847e6bb5cea24def9e544a3fb2bc90150aeaf (patch)
tree506fed4a4acff705e465385acdbf36ceae18059a /source/blender/alembic/intern/abc_mesh.cc
parent3568d56bccc556e04c61d8f6ac3f005b0ff838b7 (diff)
Alembic: changed 'void *user_data' to 'Mesh *mesh'
The only thing that is stored in this pointer is a `Mesh*`, and casting it from/to `void*` is unnecessary and confusing. Maybe the entire CDStreamConfig class could/should be removed at some point. No functional changes.
Diffstat (limited to 'source/blender/alembic/intern/abc_mesh.cc')
-rw-r--r--source/blender/alembic/intern/abc_mesh.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc
index 1903b5149c5..13cc670b7dc 100644
--- a/source/blender/alembic/intern/abc_mesh.cc
+++ b/source/blender/alembic/intern/abc_mesh.cc
@@ -900,7 +900,7 @@ ABC_INLINE void read_uvs_params(CDStreamConfig &config,
name = uv.getName();
}
- void *cd_ptr = config.add_customdata_cb(config.user_data, name.c_str(), CD_MLOOPUV);
+ void *cd_ptr = config.add_customdata_cb(config.mesh, name.c_str(), CD_MLOOPUV);
config.mloopuv = static_cast<MLoopUV *>(cd_ptr);
}
}
@@ -960,9 +960,8 @@ static void set_smooth_poly_flag(Mesh *mesh)
}
}
-static void *add_customdata_cb(void *user_data, const char *name, int data_type)
+static void *add_customdata_cb(Mesh *mesh, const char *name, int data_type)
{
- Mesh *mesh = static_cast<Mesh *>(user_data);
CustomDataType cd_data_type = static_cast<CustomDataType>(data_type);
void *cd_ptr;
CustomData *loopdata;
@@ -1047,7 +1046,7 @@ CDStreamConfig get_config(Mesh *mesh)
BLI_assert(mesh->mvert || mesh->totvert == 0);
- config.user_data = mesh;
+ config.mesh = mesh;
config.mvert = mesh->mvert;
config.mloop = mesh->mloop;
config.mpoly = mesh->mpoly;