From d89e750da68b69a75a99d07de7a5841df3ccd70b Mon Sep 17 00:00:00 2001
From: Owen Arnold <owen.arnold@stfc.ac.uk>
Date: Wed, 18 Feb 2015 17:17:28 +0000
Subject: [PATCH] refs #11056. Fix GCC warnings.

---
 Code/Mantid/Framework/API/inc/MantidAPI/IPeak.h      |  4 ++--
 .../PythonInterface/mantid/api/src/Exports/IPeak.cpp | 12 ++++++------
 Code/Mantid/MantidQt/SliceViewer/test/MockObjects.h  |  4 ++--
 .../Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h   |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/IPeak.h b/Code/Mantid/Framework/API/inc/MantidAPI/IPeak.h
index 0ceb44554ef..0ee7a8d085f 100644
--- a/Code/Mantid/Framework/API/inc/MantidAPI/IPeak.h
+++ b/Code/Mantid/Framework/API/inc/MantidAPI/IPeak.h
@@ -51,9 +51,9 @@ public:
   virtual bool findDetector() = 0;
 
   virtual void setQSampleFrame(Mantid::Kernel::V3D QSampleFrame,
-                               boost::optional<double> detectorDistance = boost::optional<double>()) = 0;
+                               boost::optional<double> detectorDistance) = 0;
   virtual void setQLabFrame(Mantid::Kernel::V3D QLabFrame,
-                            boost::optional<double> detectorDistance = boost::optional<double>()) = 0;
+                            boost::optional<double> detectorDistance) = 0;
 
   virtual void setWavelength(double wavelength) = 0;
   virtual double getWavelength() const = 0;
diff --git a/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp b/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp
index 3b50c57c7c4..e12912bc5a0 100644
--- a/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp
+++ b/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp
@@ -11,21 +11,21 @@ Mantid::Geometry::PeakShape_sptr getPeakShape(IPeak &peak) {
   return Mantid::Geometry::PeakShape_sptr(peak.getPeakShape().clone());
 }
 void setQLabFrame1(IPeak &peak, Mantid::Kernel::V3D qLabFrame) {
-  // Set the q lab frame
-  return peak.setQLabFrame(qLabFrame);
+  // Set the q lab frame. No explicit detector distance.
+  return peak.setQLabFrame(qLabFrame, boost::optional<double>());
 }
 void setQLabFrame2(IPeak &peak, Mantid::Kernel::V3D qLabFrame, double distance) {
-  // Set the q lab frame
+  // Set the q lab frame. Detector distance specified.
   return peak.setQLabFrame(qLabFrame, distance);
 }
 
 void setQSampleFrame1(IPeak &peak, Mantid::Kernel::V3D qSampleFrame) {
-   // Set the qsample frame
-   return peak.setQSampleFrame(qSampleFrame);
+   // Set the qsample frame. No explicit detector distance.
+   return peak.setQSampleFrame(qSampleFrame, boost::optional<double>());
 }
 
 void setQSampleFrame2(IPeak &peak, Mantid::Kernel::V3D qSampleFrame, double distance) {
-    // Set the qsample frame
+    // Set the qsample frame. Detector distance specified.
    return peak.setQSampleFrame(qSampleFrame, distance);
 }
 
diff --git a/Code/Mantid/MantidQt/SliceViewer/test/MockObjects.h b/Code/Mantid/MantidQt/SliceViewer/test/MockObjects.h
index da6b3e1a4c5..42cb6aa2ddc 100644
--- a/Code/Mantid/MantidQt/SliceViewer/test/MockObjects.h
+++ b/Code/Mantid/MantidQt/SliceViewer/test/MockObjects.h
@@ -200,9 +200,9 @@ class MockPeakTransformFactory : public PeakTransformFactory
     MOCK_METHOD0(findDetector,
       bool());
     MOCK_METHOD2(setQSampleFrame,
-      void(Mantid::Kernel::V3D QSampleFrame, double detectorDistance));
+      void(Mantid::Kernel::V3D QSampleFrame, boost::optional<double> detectorDistance));
     MOCK_METHOD2(setQLabFrame,
-      void(Mantid::Kernel::V3D QLabFrame, double detectorDistance));
+      void(Mantid::Kernel::V3D QLabFrame, boost::optional<double> detectorDistance));
     MOCK_METHOD1(setWavelength,
       void(double wavelength));
     MOCK_CONST_METHOD0(getWavelength,
diff --git a/Code/Mantid/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h b/Code/Mantid/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h
index 025bf2135fd..5e4fb59411a 100644
--- a/Code/Mantid/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h
+++ b/Code/Mantid/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h
@@ -36,7 +36,7 @@ public:
   MOCK_METHOD1(addPeak, void (const IPeak& ipeak));
   MOCK_METHOD1(getPeak, Mantid::DataObjects::Peak & (int peakNum));
   MOCK_CONST_METHOD1(getPeak, const Mantid::DataObjects::Peak & (int peakNum));
-  MOCK_CONST_METHOD2(createPeak, Mantid::API::IPeak* (Mantid::Kernel::V3D QLabFrame, double detectorDistance));
+  MOCK_CONST_METHOD2(createPeak, Mantid::API::IPeak* (Mantid::Kernel::V3D QLabFrame, boost::optional<double> detectorDistance));
 };
 
 //=====================================================================================
-- 
GitLab