From 8a3b51efa86041da8155a34c7601469bf8c1c9a6 Mon Sep 17 00:00:00 2001
From: Tom Perkins <thomas.perkins@stfc.ac.uk>
Date: Tue, 12 Jul 2016 14:37:38 +0100
Subject: [PATCH] Fix errors from Doxygen and builds

re #15518
---
 .../Muon/MuonAnalysisFitDataPresenter.h       | 19 +++++++---
 .../src/Muon/MuonAnalysis.cpp                 |  4 +-
 .../src/Muon/MuonAnalysisFitDataPresenter.cpp | 38 ++++++++++++++++++-
 .../Muon/MuonAnalysisFitFunctionPresenter.cpp |  2 +-
 .../src/Muon/MuonSequentialFitDialog.cpp      |  2 +-
 .../MantidQtMantidWidgets/IFunctionBrowser.h  |  2 +-
 .../IMuonFitFunctionControl.h                 |  2 +-
 .../IWorkspaceFitControl.h                    | 12 ++++--
 .../SelectFunctionDialog.h                    |  1 +
 .../MantidWidgets/src/MuonFitDataSelector.cpp |  1 +
 10 files changed, 67 insertions(+), 16 deletions(-)

diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisFitDataPresenter.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisFitDataPresenter.h
index 16c91c50494..bd21d68061b 100644
--- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisFitDataPresenter.h
+++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisFitDataPresenter.h
@@ -53,16 +53,25 @@ class MANTIDQT_CUSTOMINTERFACES_DLL MuonAnalysisFitDataPresenter
     : public QObject {
   Q_OBJECT
 public:
+  /// Constructor overload with default arguments
+  MuonAnalysisFitDataPresenter(
+      MantidQt::MantidWidgets::IWorkspaceFitControl *fitBrowser,
+      MantidQt::MantidWidgets::IMuonFitDataSelector *dataSelector,
+      MuonAnalysisDataLoader &dataLoader, const Mantid::API::Grouping &grouping,
+      const Muon::PlotType &plotType);
+  /// Constructor overload with default argument
+  MuonAnalysisFitDataPresenter(
+      MantidQt::MantidWidgets::IWorkspaceFitControl *fitBrowser,
+      MantidQt::MantidWidgets::IMuonFitDataSelector *dataSelector,
+      MuonAnalysisDataLoader &dataLoader, const Mantid::API::Grouping &grouping,
+      const Muon::PlotType &plotType, double timeZero);
   /// Constructor
   MuonAnalysisFitDataPresenter(
       MantidQt::MantidWidgets::IWorkspaceFitControl *fitBrowser,
       MantidQt::MantidWidgets::IMuonFitDataSelector *dataSelector,
       MuonAnalysisDataLoader &dataLoader, const Mantid::API::Grouping &grouping,
-      const Muon::PlotType &plotType, double timeZero = 0,
-      RebinOptions &rebinArgs =
-          RebinOptions(MantidQt::CustomInterfaces::Muon::MuonAnalysisOptionTab::
-                           RebinType::NoRebin,
-                       ""));
+      const Muon::PlotType &plotType, double timeZero,
+      const RebinOptions &rebinArgs);
   /// Handles "selected data changed"
   void handleSelectedDataChanged(bool overwrite);
   /// Handles peak picker being reassigned to a new graph
diff --git a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp
index f2e1ca25152..6715deec505 100644
--- a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp
+++ b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp
@@ -2876,8 +2876,8 @@ void MuonAnalysis::updateRebinParams() {
   rebinParams.first = m_optionTab->getRebinType();
   if (rebinParams.first == MuonAnalysisOptionTab::RebinType::FixedRebin) {
     rebinParams.second = std::to_string(m_optionTab->getRebinStep());
-  } else if (rebinParams.first =
-                 MuonAnalysisOptionTab::RebinType::VariableRebin) {
+  } else if (rebinParams.first ==
+             MuonAnalysisOptionTab::RebinType::VariableRebin) {
     rebinParams.second = m_optionTab->getRebinParams();
   }
   m_fitDataPresenter->setRebinArgs(rebinParams);
diff --git a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisFitDataPresenter.cpp b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisFitDataPresenter.cpp
index 55129acc3c9..b2186b0822d 100644
--- a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisFitDataPresenter.cpp
+++ b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisFitDataPresenter.cpp
@@ -29,6 +29,41 @@ Mantid::Kernel::Logger g_log("MuonAnalysisFitDataPresenter");
 namespace MantidQt {
 namespace CustomInterfaces {
 
+/**
+ * Constructor
+ * Defaults values for time zero (0.0) and rebinning (none)
+ * @param fitBrowser :: [input] Pointer to fit browser to update
+ * @param dataSelector :: [input] Pointer to data selector to get input from
+ * @param dataLoader :: [input] Data loader (shared with MuonAnalysis)
+ * @param grouping :: [input] Grouping set in interface for data
+ * @param plotType :: [input] Plot type set in interface
+ */
+MuonAnalysisFitDataPresenter::MuonAnalysisFitDataPresenter(
+    IWorkspaceFitControl *fitBrowser, IMuonFitDataSelector *dataSelector,
+    MuonAnalysisDataLoader &dataLoader, const Mantid::API::Grouping &grouping,
+    const Muon::PlotType &plotType)
+    : MuonAnalysisFitDataPresenter(fitBrowser, dataSelector, dataLoader,
+                                   grouping, plotType, 0.0,
+                                   RebinOptions(RebinType::NoRebin, "")) {}
+
+/**
+ * Constructor
+ * Defaults value for rebinning (none)
+ * @param fitBrowser :: [input] Pointer to fit browser to update
+ * @param dataSelector :: [input] Pointer to data selector to get input from
+ * @param dataLoader :: [input] Data loader (shared with MuonAnalysis)
+ * @param grouping :: [input] Grouping set in interface for data
+ * @param timeZero :: [input] Time zero from MuonAnalysis interface (optional)
+ * @param plotType :: [input] Plot type set in interface
+ */
+MuonAnalysisFitDataPresenter::MuonAnalysisFitDataPresenter(
+    IWorkspaceFitControl *fitBrowser, IMuonFitDataSelector *dataSelector,
+    MuonAnalysisDataLoader &dataLoader, const Mantid::API::Grouping &grouping,
+    const Muon::PlotType &plotType, double timeZero)
+    : MuonAnalysisFitDataPresenter(fitBrowser, dataSelector, dataLoader,
+                                   grouping, plotType, timeZero,
+                                   RebinOptions(RebinType::NoRebin, "")) {}
+
 /**
  * Constructor
  * @param fitBrowser :: [input] Pointer to fit browser to update
@@ -42,7 +77,8 @@ namespace CustomInterfaces {
 MuonAnalysisFitDataPresenter::MuonAnalysisFitDataPresenter(
     IWorkspaceFitControl *fitBrowser, IMuonFitDataSelector *dataSelector,
     MuonAnalysisDataLoader &dataLoader, const Mantid::API::Grouping &grouping,
-    const Muon::PlotType &plotType, double timeZero, RebinOptions &rebinArgs)
+    const Muon::PlotType &plotType, double timeZero,
+    const RebinOptions &rebinArgs)
     : m_fitBrowser(fitBrowser), m_dataSelector(dataSelector),
       m_dataLoader(dataLoader), m_timeZero(timeZero), m_rebinArgs(rebinArgs),
       m_grouping(grouping), m_plotType(plotType) {
diff --git a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisFitFunctionPresenter.cpp b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisFitFunctionPresenter.cpp
index d107f647dbe..0f09d58f9cb 100644
--- a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisFitFunctionPresenter.cpp
+++ b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisFitFunctionPresenter.cpp
@@ -165,7 +165,7 @@ void MuonAnalysisFitFunctionPresenter::handleFunctionLoaded(
 /**
  * Called when the number of datasets to fit is changed in the model.
  * Update the view with the new number of datasets.
- * @param n :: [input] Number of datasets to fit
+ * @param nDatasets :: [input] Number of datasets to fit
  */
 void MuonAnalysisFitFunctionPresenter::updateNumberOfDatasets(int nDatasets) {
   m_funcBrowser->setNumberOfDatasets(nDatasets);
diff --git a/MantidQt/CustomInterfaces/src/Muon/MuonSequentialFitDialog.cpp b/MantidQt/CustomInterfaces/src/Muon/MuonSequentialFitDialog.cpp
index fddef594562..4b20fb0baaf 100644
--- a/MantidQt/CustomInterfaces/src/Muon/MuonSequentialFitDialog.cpp
+++ b/MantidQt/CustomInterfaces/src/Muon/MuonSequentialFitDialog.cpp
@@ -455,7 +455,7 @@ void MuonSequentialFitDialog::continueFit() {
 
       // If multiple groups/periods, set up simultaneous fit
       if (datasetsPerRun > 1) {
-        for (int i = 1; i < workspacesToFit.size(); i++) {
+        for (size_t i = 1; i < workspacesToFit.size(); i++) {
           std::string suffix = boost::lexical_cast<std::string>(i);
           fit->setPropertyValue("InputWorkspace_" + suffix, workspacesToFit[i]);
           fit->setProperty("WorkspaceIndex_" + suffix, 0);
diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IFunctionBrowser.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IFunctionBrowser.h
index 9ccab302175..2533fc59a34 100644
--- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IFunctionBrowser.h
+++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IFunctionBrowser.h
@@ -68,4 +68,4 @@ public:
 } // namespace MantidWidgets
 } // namespace MantidQt
 
-#endif MANTID_MANTIDWIDGETS_IFUNCTIONBROWSER_H
\ No newline at end of file
+#endif // MANTID_MANTIDWIDGETS_IFUNCTIONBROWSER_H
\ No newline at end of file
diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IMuonFitFunctionControl.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IMuonFitFunctionControl.h
index 92bd661f800..744ebb97903 100644
--- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IMuonFitFunctionControl.h
+++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IMuonFitFunctionControl.h
@@ -52,4 +52,4 @@ signals:
 } // namespace MantidWidgets
 } // namespace MantidQt
 
-#endif MANTID_MANTIDWIDGETS_IMUONFITFUNCTIONCONTROL_H
\ No newline at end of file
+#endif // MANTID_MANTIDWIDGETS_IMUONFITFUNCTIONCONTROL_H
\ No newline at end of file
diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IWorkspaceFitControl.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IWorkspaceFitControl.h
index decb7bcd1bd..a794a0b81f7 100644
--- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IWorkspaceFitControl.h
+++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/IWorkspaceFitControl.h
@@ -41,10 +41,14 @@ public:
   virtual void setEndX(double end) = 0;
   virtual void setWorkspaceIndex(int i) = 0;
   virtual void allowSequentialFits(bool allow) = 0;
-  virtual void setWorkspaceNames(const QStringList &wsNames) {}
-  virtual void workspacesToFitChanged(int n) {}
-  virtual void setSimultaneousLabel(const std::string &label) {}
-  virtual void userChangedDataset(int index) {}
+  virtual void setWorkspaceNames(const QStringList &wsNames) {
+    UNUSED_ARG(wsNames)
+  }
+  virtual void workspacesToFitChanged(int n) { UNUSED_ARG(n) }
+  virtual void setSimultaneousLabel(const std::string &label) {
+    UNUSED_ARG(label)
+  }
+  virtual void userChangedDataset(int index) { UNUSED_ARG(index) }
 };
 
 } // namespace MantidWidgets
diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SelectFunctionDialog.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SelectFunctionDialog.h
index dcaef394c5f..ef6a7c37542 100644
--- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SelectFunctionDialog.h
+++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SelectFunctionDialog.h
@@ -7,6 +7,7 @@
 #include "WidgetDllOption.h"
 
 #include <QDialog>
+#include <map>
 
 namespace Ui {
 class SelectFunctionDialog;
diff --git a/MantidQt/MantidWidgets/src/MuonFitDataSelector.cpp b/MantidQt/MantidWidgets/src/MuonFitDataSelector.cpp
index 153ea3d856f..0f4f86a18c0 100644
--- a/MantidQt/MantidWidgets/src/MuonFitDataSelector.cpp
+++ b/MantidQt/MantidWidgets/src/MuonFitDataSelector.cpp
@@ -1,4 +1,5 @@
 #include "MantidQtMantidWidgets/MuonFitDataSelector.h"
+#include "MantidKernel/Logger.h"
 
 namespace {
 Mantid::Kernel::Logger g_log("MuonFitDataSelector");
-- 
GitLab