Sculpting: initialise uninitialised variable
Initialise `sum = 0.0f` before adding to it. Otherwise it'll get not just a compiler warning, but also undefined behaviour.
This commit is contained in:
parent
84cbf33b38
commit
13276e1f1e
@ -329,7 +329,7 @@ BLI_NOINLINE static void fill_factor_from_hide_and_mask(const BMesh &bm,
|
||||
|
||||
const BMLoop *l_iter = f->l_first = BM_FACE_FIRST_LOOP(f);
|
||||
int total_verts = 0;
|
||||
float sum;
|
||||
float sum = 0.0f;
|
||||
do {
|
||||
BMVert *vert = l_iter->v;
|
||||
sum += BM_ELEM_CD_GET_FLOAT(vert, mask_offset);
|
||||
|
Loading…
Reference in New Issue
Block a user