Import 2017-06-07 23:51:09: master 9b2369b8

Author Committer Branch Timestamp Parent
msmolens msmolens master 2015-12-04 11:06:46 master 21caa171
Changeset

COMP: qSlicerVolumeRenderingModuleWidget: Fix Visual Studio build

This commit fixes a regression introduced in r24803 (ENH: Support VR
ROI visibility update through MRML node) removing the use of Variable
Length Array allocated (VLA) on the stack that are allowed in gcc but not
supported in Visual Studio.

For more details, see [1][2]

[1] http://stackoverflow.com/questions/7812566/why-no-variable-size-array-in-stack/7812587#7812587
[2] https://msdn.microsoft.com/library/zb1574zs(v=vs.100).aspx

Error reported by Visual Studio (VS) was the following:

Modules\Loadable\VolumeRendering\Widgets\qSlicerVolumeRenderingModuleWidget.cxx(833): error C2057: expected constant expression
Modules\Loadable\VolumeRendering\Widgets\qSlicerVolumeRenderingModuleWidget.cxx(833): error C2466: cannot allocate an array of constant size 0
Modules\Loadable\VolumeRendering\Widgets\qSlicerVolumeRenderingModuleWidget.cxx(833): error C2133: 'wasModifying' : unknown size

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24806 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Modules/Loadable/VolumeRendering/Widgets/qSlicerVolumeRenderingModuleWidget.cxx Diff File