Skip to content
Snippets Groups Projects
Commit 1c94548a authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

m_mask -> unique_ptr

parent fa83baf7
No related branches found
No related tags found
1 merge request!1837RectangularDetector members -> unique pointers, and other unification and cleanup of detector-related code
......@@ -78,7 +78,7 @@ IDetector::IDetector(const IDetector& other)
, m_axes(other.m_axes)
, m_polAnalyzer(other.m_polAnalyzer)
, m_resolution(other.m_resolution ? other.m_resolution->clone() : nullptr)
, m_mask(other.m_mask)
, m_mask(std::make_unique<DetectorMask>(*other.m_mask))
{
}
......
......@@ -189,7 +189,7 @@ private:
std::array<std::shared_ptr<Scale>, 2> m_axes;
PolFilter m_polAnalyzer;
std::unique_ptr<IDetectorResolution> m_resolution;
std::shared_ptr<DetectorMask> m_mask;
std::unique_ptr<DetectorMask> m_mask;
#endif // SWIG
};
......
......@@ -352,9 +352,9 @@ std::string defineScatteringSimulation(const ScatteringSimulation& simulation)
result << "\n" << indent() << "# Define GISAS simulation:\n";
result << defineGISASBeam(simulation);
result << defineDetector(simulation.detector());
result << defineMasks(simulation.detector());
result << indent() << "simulation = ba.ScatteringSimulation(beam, sample, detector)\n";
result << defineParameterDistributions(simulation.paramDistributions());
result << defineMasks(simulation.detector());
result << defineSimulationOptions(simulation.options());
result << defineBackground(simulation);
return result.str();
......
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