Commit d49f1e8b authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot
Browse files

Merge topic 'maybe_uninitialized_warnings'

fcced134

 Correct maybe-uninitialized warnings found from examples
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1490
parents 9747a89a fcced134
...@@ -59,7 +59,6 @@ protected: ...@@ -59,7 +59,6 @@ protected:
using DefaultConstHandle = typename DefaultHandle::ExecutionTypes<Device>::PortalConst; using DefaultConstHandle = typename DefaultHandle::ExecutionTypes<Device>::PortalConst;
using CartesianConstPortal = typename CartesianArrayHandle::ExecutionTypes<Device>::PortalConst; using CartesianConstPortal = typename CartesianArrayHandle::ExecutionTypes<Device>::PortalConst;
vtkm::Float32 InverseDeltaScalar;
DefaultConstHandle CoordPortals[3]; DefaultConstHandle CoordPortals[3];
CartesianConstPortal Coordinates; CartesianConstPortal Coordinates;
vtkm::exec::ConnectivityStructured<vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, 3> vtkm::exec::ConnectivityStructured<vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, 3>
...@@ -331,14 +330,16 @@ public: ...@@ -331,14 +330,16 @@ public:
: ColorMap(colorMap.PrepareForInput(Device())) : ColorMap(colorMap.PrepareForInput(Device()))
, MinScalar(minScalar) , MinScalar(minScalar)
, SampleDistance(sampleDistance) , SampleDistance(sampleDistance)
, InverseDeltaScalar(minScalar)
, Locator(locator) , Locator(locator)
{ {
ColorMapSize = colorMap.GetNumberOfValues() - 1; ColorMapSize = colorMap.GetNumberOfValues() - 1;
if ((maxScalar - minScalar) != 0.f) if ((maxScalar - minScalar) != 0.f)
{
InverseDeltaScalar = 1.f / (maxScalar - minScalar); InverseDeltaScalar = 1.f / (maxScalar - minScalar);
else }
InverseDeltaScalar = minScalar;
} }
using ControlSignature = void(FieldIn<>, using ControlSignature = void(FieldIn<>,
FieldIn<>, FieldIn<>,
FieldIn<>, FieldIn<>,
...@@ -527,13 +528,14 @@ public: ...@@ -527,13 +528,14 @@ public:
: ColorMap(colorMap.PrepareForInput(Device())) : ColorMap(colorMap.PrepareForInput(Device()))
, MinScalar(minScalar) , MinScalar(minScalar)
, SampleDistance(sampleDistance) , SampleDistance(sampleDistance)
, InverseDeltaScalar(minScalar)
, Locator(locator) , Locator(locator)
{ {
ColorMapSize = colorMap.GetNumberOfValues() - 1; ColorMapSize = colorMap.GetNumberOfValues() - 1;
if ((maxScalar - minScalar) != 0.f) if ((maxScalar - minScalar) != 0.f)
{
InverseDeltaScalar = 1.f / (maxScalar - minScalar); InverseDeltaScalar = 1.f / (maxScalar - minScalar);
else }
InverseDeltaScalar = minScalar;
} }
using ControlSignature = void(FieldIn<>, using ControlSignature = void(FieldIn<>,
FieldIn<>, FieldIn<>,
......
...@@ -155,7 +155,8 @@ protected: ...@@ -155,7 +155,8 @@ protected:
vtkm::Vec<ScalarType, 3>& outpos) const override vtkm::Vec<ScalarType, 3>& outpos) const override
{ {
ScalarType stepLength = StepLength; ScalarType stepLength = StepLength;
vtkm::Vec<ScalarType, 3> velocity, currentVelocity; vtkm::Vec<ScalarType, 3> velocity = { 0.0f, 0.0f, 0.0f };
vtkm::Vec<ScalarType, 3> currentVelocity = { 0.0f, 0.0f, 0.0f };
CheckStep(inpos, 0.0f, time, currentVelocity); CheckStep(inpos, 0.0f, time, currentVelocity);
numSteps = numSteps == 0 ? 1 : numSteps; numSteps = numSteps == 0 ? 1 : numSteps;
if (MinimizeError) if (MinimizeError)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment