Skip to content
Snippets Groups Projects
Commit 9bc9bf42 authored by Mirko Wächter's avatar Mirko Wächter
Browse files

Merge branch 'cherry-pick-7648c4e0' into 'master'

Fix ControlThreadOutputBuffer copy ctor to also copy values

Closes #12

See merge request ArmarX/RobotAPI!45
parents 98267a21 7ce76fd8
No related branches found
No related tags found
1 merge request!45Fix ControlThreadOutputBuffer copy ctor to also copy values
......@@ -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