Commit 8d7d9526 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Fix GCC warning and work around MSVC error.

parent 6c2d67cd
......@@ -45,8 +45,16 @@ public:
/// Copy constructor
Peak(const Peak &other);
// MSVC 2015 won't build with noexcept.
// error C2610: 'Mantid::DataObjects::Peak::Peak(Mantid::DataObjects::Peak &&)
// noexcept': is not a special member function which can be defaulted
#if defined(_MSC_VER) && _MSC_VER <= 1700
Peak(Peak &&);
Peak &operator=(Peak &&);
#else
Peak(Peak &&) noexcept;
Peak &operator=(Peak &&) noexcept;
#endif
// Construct a peak from a reference to the interface
......
......@@ -231,9 +231,13 @@ Peak::Peak(const Geometry::IPeak &ipeak)
}
}
#if defined(_MSC_VER) && _MSC_VER <= 1700
Peak::Peak(Peak &&) = default;
Peak &Peak::operator=(Peak &&) = default;
#else
Peak::Peak(Peak &&) noexcept = default;
Peak &Peak::operator=(Peak &&) noexcept = default;
#endif
//----------------------------------------------------------------------------------------------
/** Set the incident wavelength of the neutron. Calculates the energy from this.
* Assumes elastic scattering.
......
......@@ -182,13 +182,13 @@ public:
MOCK_METHOD1(setK, void(double m_K));
MOCK_METHOD1(setL, void(double m_L));
MOCK_METHOD3(setHKL, void(double H, double K, double L));
MOCK_METHOD1(setHKL, void(Mantid::Kernel::V3D HKL));
MOCK_METHOD1(setHKL, void(const Mantid::Kernel::V3D &HKL));
MOCK_CONST_METHOD0(getQLabFrame, Mantid::Kernel::V3D());
MOCK_CONST_METHOD0(getQSampleFrame, Mantid::Kernel::V3D());
MOCK_METHOD0(findDetector, bool());
MOCK_METHOD2(setQSampleFrame, void(Mantid::Kernel::V3D QSampleFrame,
MOCK_METHOD2(setQSampleFrame, void(const Mantid::Kernel::V3D &QSampleFrame,
boost::optional<double> detectorDistance));
MOCK_METHOD2(setQLabFrame, void(Mantid::Kernel::V3D QLabFrame,
MOCK_METHOD2(setQLabFrame, void(const Mantid::Kernel::V3D &QLabFrame,
boost::optional<double> detectorDistance));
MOCK_METHOD1(setWavelength, void(double wavelength));
MOCK_CONST_METHOD0(getWavelength, double());
......@@ -207,7 +207,7 @@ public:
MOCK_METHOD1(setBinCount, void(double m_BinCount));
MOCK_CONST_METHOD0(getGoniometerMatrix, Mantid::Kernel::Matrix<double>());
MOCK_METHOD1(setGoniometerMatrix,
void(Mantid::Kernel::Matrix<double> m_GoniometerMatrix));
void(const Mantid::Kernel::Matrix<double> &m_GoniometerMatrix));
MOCK_CONST_METHOD0(getBankName, std::string());
MOCK_CONST_METHOD0(getRow, int());
MOCK_CONST_METHOD0(getCol, int());
......
Supports Markdown
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