diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-12 11:23:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-12 11:23:40 +0300 |
commit | b380f4927e30bc2877b4f3a760fefa0dfc3614e1 (patch) | |
tree | 4766d74b4f198c8a8e2dd22702855b4bf18a6cd8 | |
parent | 208f25d62623ce3496471bdc6781d4105b0c6ce1 (diff) |
Remove bool -> int cast
Wont work as expected on big endian systems
-rw-r--r-- | source/blender/blenkernel/intern/mesh_render.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/mesh_render.c b/source/blender/blenkernel/intern/mesh_render.c index 0625662fecb..cf4992cdcb4 100644 --- a/source/blender/blenkernel/intern/mesh_render.c +++ b/source/blender/blenkernel/intern/mesh_render.c @@ -1323,17 +1323,17 @@ Batch *BKE_mesh_batch_cache_get_overlay_facedots(Mesh *me) for (int i = 0; i < poly_ct; ++i) { float pcenter[3], pnor[3]; - int selected = 0; + bool selected = false; - mesh_render_data_pnors_pcenter_select_get(mrdata, i, pnor, pcenter, (bool *)&selected); + mesh_render_data_pnors_pcenter_select_get(mrdata, i, pnor, pcenter, &selected); #if USE_10_10_10 PackedNormal nor = { .x = 0, .y = 0, .z = -511 }; nor = convert_i10_v3(pnor); - nor.w = selected; + nor.w = selected ? 1 : 0; VertexBuffer_set_attrib(vbo, data_id, i, &nor); #else - float nor[4] = {pnor[0], pnor[1], pnor[2], (float)selected}; + float nor[4] = {pnor[0], pnor[1], pnor[2], selected ? 1 : 0}; VertexBuffer_set_attrib(vbo, data_id, i, nor); #endif |