Skip to content
Snippets Groups Projects
Commit 14455fba authored by WHITFIELDRE email's avatar WHITFIELDRE email
Browse files

Fix compiler warning on gcc 7.5

warning: ‘detectorDistance’ may be used uninitialized in this function
parent becfe8e2
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,6 @@
#include "MantidKernel/System.h"
#include "MantidMDAlgorithms/IntegratePeaksMD.h"
using Mantid::DataObjects::PeaksWorkspace;
namespace Mantid {
namespace MDAlgorithms {
......@@ -85,7 +83,7 @@ void CentroidPeaksMD2::integrate(typename MDEventWorkspace<MDE, nd>::sptr ws) {
// Get a direct ref to that peak.
IPeak &p = peakWS->getPeak(i);
Peak *peak = dynamic_cast<Peak *>(&p);
double detectorDistance;
double detectorDistance = 0.;
if (peak)
detectorDistance = p.getL2();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment