Cleanup: redundant cast, unused arguments

This commit is contained in:
Campbell Barton 2020-03-26 15:36:24 +11:00
parent e990e55eba
commit b2b6099666
2 changed files with 6 additions and 6 deletions

View File

@ -856,7 +856,7 @@ void BKE_volume_grids_backup_restore(Volume *volume, VolumeGridVector *grids, co
volume->runtime.grids = grids;
}
#else
UNUSED_VARS(volume, grids);
UNUSED_VARS(volume, grids, filepath);
#endif
}
@ -967,7 +967,7 @@ void BKE_volume_grid_unload(const Volume *volume, VolumeGrid *grid)
const char *volume_name = volume->id.name + 2;
grid->unload(volume_name);
#else
UNUSED_VARS(grid);
UNUSED_VARS(volume, grid);
#endif
}

View File

@ -543,18 +543,18 @@ static void sculpt_vertex_neighbors_get_faces(SculptSession *ss,
int index,
SculptVertexNeighborIter *iter)
{
MeshElemMap *vert_map = &ss->pmap[(int)index];
MeshElemMap *vert_map = &ss->pmap[index];
iter->size = 0;
iter->num_duplicates = 0;
iter->capacity = SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY;
iter->neighbors = iter->neighbors_fixed;
for (int i = 0; i < ss->pmap[(int)index].count; i++) {
for (int i = 0; i < ss->pmap[index].count; i++) {
const MPoly *p = &ss->mpoly[vert_map->indices[i]];
uint f_adj_v[2];
if (poly_get_adj_loops_from_vert(p, ss->mloop, (int)index, f_adj_v) != -1) {
if (poly_get_adj_loops_from_vert(p, ss->mloop, index, f_adj_v) != -1) {
for (int j = 0; j < ARRAY_SIZE(f_adj_v); j += 1) {
if (f_adj_v[j] != (int)index) {
if (f_adj_v[j] != index) {
sculpt_vertex_neighbor_add(iter, f_adj_v[j]);
}
}