mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
fix broken rvalue-forward & SerialContainer assert
Release mode builds previously produced broken solutions with too many entries, debug build triggered the assert container.cpp:334: assert(solution.empty()) The standard guarantees std::vector(&&a) leaves a.empty() == true, so the logic there is fine as long as subsolutions is actually used for move-construction.
This commit is contained in:
parent
b9a86eb5be
commit
b379ba2268
@ -300,7 +300,7 @@ public:
|
||||
: SolutionBase()
|
||||
{}
|
||||
SolutionSequence(container_type&& subsolutions, double cost = 0.0, StagePrivate* creator = nullptr)
|
||||
: SolutionBase(creator, cost), subsolutions_(subsolutions)
|
||||
: SolutionBase(creator, cost), subsolutions_(std::move(subsolutions))
|
||||
{}
|
||||
|
||||
void push_back(const SolutionBase& solution);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user