Skip to content
Snippets Groups Projects
Commit 7648c4e0 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Fix ControlThreadOutputBuffer copy ctor to also copy values

parent 0d8e3677
No related branches found
No related tags found
No related merge requests found
......@@ -420,12 +420,14 @@ namespace armarx
return resultPlace;
};
//copy sensor values
sensors.reserve(other.sensors.size());
for (const SensorValueBase* sv : other.sensors)
{
sensors.emplace_back(sv->_placementConstruct(getAlignedPlace(sv->_sizeof(), sv->_alignof())));
sensors.emplace_back(sv->_placementCopyConstruct(getAlignedPlace(sv->_sizeof(), sv->_alignof())));
}
//copy control targets
control.reserve(other.control.size());
for (const auto& cdctargs : other.control)
{
......@@ -434,8 +436,7 @@ namespace armarx
ctargs.reserve(cdctargs.size());
for (const ControlTargetBase* ct : cdctargs)
{
ctargs.emplace_back(ct->_placementConstruct(getAlignedPlace(ct->_sizeof(), ct->_alignof())));
ctargs.back()->reset();
ctargs.emplace_back(ct->_placementCopyConstruct(getAlignedPlace(ct->_sizeof(), ct->_alignof())));
}
}
}
......
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