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:
authorCampbell Barton <ideasman42@gmail.com>2018-05-08 20:36:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-08 20:36:02 +0300
commit4f213c14953c182994dc3fe65e0602032733540e (patch)
treed951451166dc6de4ecd29fab4bcccca157189e4f /source/blender/blenkernel/intern/mesh_runtime.c
parent305c455ffe36161baeb9495942808ddb7ac486bb (diff)
Cleanup: naming (prefer len over num for new code)
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_runtime.c')
-rw-r--r--source/blender/blenkernel/intern/mesh_runtime.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c
index 96fc472ac8f..aebf03151d1 100644
--- a/source/blender/blenkernel/intern/mesh_runtime.c
+++ b/source/blender/blenkernel/intern/mesh_runtime.c
@@ -54,28 +54,28 @@ static ThreadRWMutex loops_cache_lock = PTHREAD_RWLOCK_INITIALIZER;
static void mesh_ensure_looptri_data(Mesh *mesh)
{
const unsigned int totpoly = mesh->totpoly;
- const int looptris_num = poly_to_tri_count(totpoly, mesh->totloop);
+ const int looptris_len = poly_to_tri_count(totpoly, mesh->totloop);
BLI_assert(mesh->runtime.looptris.array_wip == NULL);
SWAP(MLoopTri *, mesh->runtime.looptris.array, mesh->runtime.looptris.array_wip);
- if ((looptris_num > mesh->runtime.looptris.num_alloc) ||
- (looptris_num < mesh->runtime.looptris.num_alloc * 2) ||
+ if ((looptris_len > mesh->runtime.looptris.len_alloc) ||
+ (looptris_len < mesh->runtime.looptris.len_alloc * 2) ||
(totpoly == 0))
{
MEM_SAFE_FREE(mesh->runtime.looptris.array_wip);
- mesh->runtime.looptris.num_alloc = 0;
- mesh->runtime.looptris.num = 0;
+ mesh->runtime.looptris.len_alloc = 0;
+ mesh->runtime.looptris.len = 0;
}
if (totpoly) {
if (mesh->runtime.looptris.array_wip == NULL) {
- mesh->runtime.looptris.array_wip = MEM_malloc_arrayN(looptris_num, sizeof(*mesh->runtime.looptris.array_wip), __func__);
- mesh->runtime.looptris.num_alloc = looptris_num;
+ mesh->runtime.looptris.array_wip = MEM_malloc_arrayN(looptris_len, sizeof(*mesh->runtime.looptris.array_wip), __func__);
+ mesh->runtime.looptris.len_alloc = looptris_len;
}
- mesh->runtime.looptris.num = looptris_num;
+ mesh->runtime.looptris.len = looptris_len;
}
}
@@ -100,7 +100,7 @@ void BKE_mesh_runtime_looptri_recalc(Mesh *mesh)
int BKE_mesh_runtime_looptri_len(const Mesh *mesh)
{
const int looptri_len = poly_to_tri_count(mesh->totpoly, mesh->totloop);
- BLI_assert(ELEM(mesh->runtime.looptris.num, 0, looptri_len));
+ BLI_assert(ELEM(mesh->runtime.looptris.len, 0, looptri_len));
return looptri_len;
}
@@ -114,7 +114,7 @@ const MLoopTri *BKE_mesh_runtime_looptri_ensure(Mesh *mesh)
BLI_rw_mutex_unlock(&loops_cache_lock);
if (looptri != NULL) {
- BLI_assert(BKE_mesh_runtime_looptri_len(mesh) == mesh->runtime.looptris.num);
+ BLI_assert(BKE_mesh_runtime_looptri_len(mesh) == mesh->runtime.looptris.len);
}
else {
BLI_rw_mutex_lock(&loops_cache_lock, THREAD_LOCK_WRITE);