Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default-initialize SubTurbineCrossings fields
Add default values for closestIndex (0), nextIndex (0), nextDistance (0.0f). Should resolve the following compiler errors: src/RecoTracker/TkDetLayers/src/PixelForwardLayerPhase1.cc: In member function 'virtual void PixelForwardLayerPhase1::groupedCompatibleDetsV(const TrajectoryStateOnSurface&, const Propagator&, const MeasurementEstim ator&, std::vector<DetGroup>&) const': src/RecoTracker/TkDetLayers/src/PixelForwardLayerPhase1.cc:232:70: error: 'crossings_inner.PixelForwardLayerPhase1::SubTurbineCrossings::nextIndex' may be used uninitialized in this function [-Werror=maybe-uninitialized] int negStart = min( crossings.closestIndex, crossings.nextIndex) - 1; ^ src/RecoTracker/TkDetLayers/src/PixelForwardLayerPhase1.cc:124:24: note: 'crossings_inner.PixelForwardLayerPhase1::SubTurbineCrossings::nextIndex' was declared here SubTurbineCrossings crossings_inner; ^ src/RecoTracker/TkDetLayers/src/PixelForwardLayerPhase1.cc:232:70: error: 'crossings_inner.PixelForwardLayerPhase1::SubTurbineCrossings::closestIndex' may be used uninitialized in this function [-Werror=maybe-uninitialized] int negStart = min( crossings.closestIndex, crossings.nextIndex) - 1; ^ src/RecoTracker/TkDetLayers/src/PixelForwardLayerPhase1.cc:124:24: note: 'crossings_inner.PixelForwardLayerPhase1::SubTurbineCrossings::closestIndex' was declared here SubTurbineCrossings crossings_inner; ^ Signed-off-by: David Abdurachmanov <[email protected]> (cherry picked from commit e6c6062)
- Loading branch information