diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/IMDWorkspace.h b/Code/Mantid/Framework/API/inc/MantidAPI/IMDWorkspace.h index 144d85de410dbc478b537ebd974fbe1d36a46ee6..cab3a6a7cc392213ef388a9ab43f3630c7e01ac5 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/IMDWorkspace.h +++ b/Code/Mantid/Framework/API/inc/MantidAPI/IMDWorkspace.h @@ -133,8 +133,8 @@ public: virtual MDNormalization displayNormalization() const; protected: - IMDWorkspace(const IMDWorkspace &other) = default; - IMDWorkspace &operator=(const IMDWorkspace &other) = default; + IMDWorkspace(const IMDWorkspace &other); + IMDWorkspace &operator=(const IMDWorkspace &other); virtual const std::string toString() const; }; diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/Workspace.h b/Code/Mantid/Framework/API/inc/MantidAPI/Workspace.h index 92a93103884503a50bba52794fc7842b913a9144..e80f548593cab43404ac6aed2289ac4dfa5d5632 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/Workspace.h +++ b/Code/Mantid/Framework/API/inc/MantidAPI/Workspace.h @@ -84,8 +84,8 @@ public: const WorkspaceHistory &getHistory() const { return m_history; } protected: - Workspace(const Workspace &other) = default; - Workspace &operator=(const Workspace &other) = default; + Workspace(const Workspace &other); + Workspace &operator=(const Workspace &other); private: void setName(const std::string &); diff --git a/Code/Mantid/Framework/API/src/IMDWorkspace.cpp b/Code/Mantid/Framework/API/src/IMDWorkspace.cpp index 330761ab8c17d5660826f36779a7e84caf167163..e5484916df383d96b3904bcaacbf82dd17167c0b 100644 --- a/Code/Mantid/Framework/API/src/IMDWorkspace.cpp +++ b/Code/Mantid/Framework/API/src/IMDWorkspace.cpp @@ -13,6 +13,11 @@ namespace API { /** Default constructor */ IMDWorkspace::IMDWorkspace() : Workspace(), Mantid::API::MDGeometry() {} +//----------------------------------------------------------------------------------------------- +/** Copy constructor */ +IMDWorkspace::IMDWorkspace(const IMDWorkspace &other) + : Workspace(other), Mantid::API::MDGeometry(other) {} + /// Destructor IMDWorkspace::~IMDWorkspace() {} diff --git a/Code/Mantid/Framework/API/src/Workspace.cpp b/Code/Mantid/Framework/API/src/Workspace.cpp index e1f343c83f434abf39321b471aca0ad5010cf0aa..2b6dcfbf166f9272b176a9cd561cf9d497d27020 100644 --- a/Code/Mantid/Framework/API/src/Workspace.cpp +++ b/Code/Mantid/Framework/API/src/Workspace.cpp @@ -11,6 +11,13 @@ namespace API { Workspace::Workspace() : DataItem(), m_title(), m_comment(), m_name(), m_history() {} +/** Copy constructor + * @param other :: workspace to copy + */ +Workspace::Workspace(const Workspace &other) + : DataItem(other), m_title(other.m_title), m_comment(other.m_comment), + m_name(other.m_name), m_history(other.m_history) {} + /// Workspace destructor Workspace::~Workspace() {}