mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
Skip Fallbacks::replaceImpl() when already correctly initialized (#494)
Do not reinitialize a Fallbacks' pimpl if it already serves the desired interface.
This commit is contained in:
parent
ab4bb40dfd
commit
dcde89d4d5
@ -876,6 +876,8 @@ void Fallbacks::onNewSolution(const SolutionBase& s) {
|
||||
|
||||
inline void Fallbacks::replaceImpl() {
|
||||
FallbacksPrivate *impl = pimpl();
|
||||
if (pimpl()->interfaceFlags() == pimpl()->requiredInterface())
|
||||
return;
|
||||
switch (pimpl()->requiredInterface()) {
|
||||
case GENERATE:
|
||||
impl = new FallbacksPrivateGenerator(std::move(*impl));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user