Fix gcc uninitialized variable redo

master
Cory Petkovsek 2019-06-25 23:50:49 +09:00
parent b13dccd998
commit a8ead9d07e
1 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,7 @@ namespace {
inline void do_op(VoxelBuffer &buffer, int x, int y, int z, float d1, VoxelIsoSurfaceTool::Operation op) {
float res=0;
float res;
switch (op) {
@ -48,6 +48,10 @@ inline void do_op(VoxelBuffer &buffer, int x, int y, int z, float d1, VoxelIsoSu
case VoxelIsoSurfaceTool::OP_SET:
res = d1;
break;
default:
res = 0;
break;
}
buffer.set_voxel_f(res, x, y, z, VoxelBuffer::CHANNEL_ISOLEVEL);