Commit fcced134 authored by Robert Maynard's avatar Robert Maynard

Correct maybe-uninitialized warnings found from examples

parent 9747a89a
......@@ -59,7 +59,6 @@ protected:
using DefaultConstHandle = typename DefaultHandle::ExecutionTypes<Device>::PortalConst;
using CartesianConstPortal = typename CartesianArrayHandle::ExecutionTypes<Device>::PortalConst;
vtkm::Float32 InverseDeltaScalar;
DefaultConstHandle CoordPortals[3];
CartesianConstPortal Coordinates;
vtkm::exec::ConnectivityStructured<vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, 3>
......@@ -331,14 +330,16 @@ public:
: ColorMap(colorMap.PrepareForInput(Device()))
, MinScalar(minScalar)
, SampleDistance(sampleDistance)
, InverseDeltaScalar(minScalar)
, Locator(locator)
{
ColorMapSize = colorMap.GetNumberOfValues() - 1;
if ((maxScalar - minScalar) != 0.f)
{
InverseDeltaScalar = 1.f / (maxScalar - minScalar);
else
InverseDeltaScalar = minScalar;
}
}
using ControlSignature = void(FieldIn<>,
FieldIn<>,
FieldIn<>,
......@@ -527,13 +528,14 @@ public:
: ColorMap(colorMap.PrepareForInput(Device()))
, MinScalar(minScalar)
, SampleDistance(sampleDistance)
, InverseDeltaScalar(minScalar)
, Locator(locator)
{
ColorMapSize = colorMap.GetNumberOfValues() - 1;
if ((maxScalar - minScalar) != 0.f)
{
InverseDeltaScalar = 1.f / (maxScalar - minScalar);
else
InverseDeltaScalar = minScalar;
}
}
using ControlSignature = void(FieldIn<>,
FieldIn<>,
......
......@@ -155,7 +155,8 @@ protected:
vtkm::Vec<ScalarType, 3>& outpos) const override
{
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);
numSteps = numSteps == 0 ? 1 : numSteps;
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