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

OwningVector etc c'tor: copy elision

parent d675a58a
No related branches found
No related tags found
1 merge request!1900coord trafo at Frame level, with 1st application to AxesInDifferentUnits
......@@ -33,7 +33,7 @@ class CloneableVector : public OwningVector<T> {
public:
CloneableVector() = default;
//! Constructor that takes over ownership of elements in given vector
CloneableVector(const std::vector<T*>& v)
CloneableVector(std::vector<T*> v)
: OwningVector<T>(v)
{
}
......
......@@ -31,7 +31,7 @@ class OwningVector {
public:
OwningVector() = default;
//! Constructor that takes over ownership of elements in given vector
OwningVector(const std::vector<T*>& v)
OwningVector(std::vector<T*> v)
{
m_v.reserve(v.size());
for (T* e : v)
......
......@@ -190,6 +190,11 @@ Datafield IDetector::createDetectorMap() const
for (size_t i = 0; i < 2; ++i)
axes.emplace_back(new Scale(axis(i).clipped(regionOfInterestBounds(i))));
return Datafield(std::move(axes));
/*
auto* f = new Frame(*m_frame);
f->setAxes(axes);
return Datafield(f);
*/
}
std::pair<double, double> IDetector::regionOfInterestBounds(size_t iAxis) const
......
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