@@ -178,7 +178,7 @@ namespace animation {
178178
179179 auto sequence = std::shared_ptr<ModelAnimationSegmentSerial>(new ModelAnimationSegmentSerial ());
180180 sequence->addSegment (std::shared_ptr<ModelAnimationSegment>(new ModelAnimationSegmentSetOffset (submodel, m_defaultOffset, ModelAnimationCoordinateRelation::RELATIVE_COORDS )));
181- sequence->addSegment (std::shared_ptr<ModelAnimationSegment>(new ModelAnimationSegmentTranslation (submodel, m_defaultOffset, m_velocity, std::nullopt , m_acceleration, ModelAnimationSegmentTranslation::CoordinateSystem::COORDS_PARENT , ModelAnimationCoordinateRelation::ABSOLUTE_COORDS )));
181+ sequence->addSegment (std::shared_ptr<ModelAnimationSegment>(new ModelAnimationSegmentTranslation (std::move ( submodel) , m_defaultOffset, m_velocity, std::nullopt , m_acceleration, ModelAnimationSegmentTranslation::CoordinateSystem::COORDS_PARENT , ModelAnimationCoordinateRelation::ABSOLUTE_COORDS )));
182182
183183 anim->setAnimation (sequence);
184184
@@ -377,7 +377,7 @@ namespace animation {
377377 auto submodel = parentSet->getSubmodel (link.submodel );
378378 auto rotation = std::make_shared<ModelAnimationSegmentRotation>(submodel, std::optional<angles>({0 ,0 ,0 }), std::nullopt , m_time, link.acceleration , ModelAnimationCoordinateRelation::ABSOLUTE_COORDS );
379379 parallelIK->addSegment (rotation);
380- segment->m_chain .push_back ({submodel, link.constraint , rotation});
380+ segment->m_chain .push_back ({submodel, link.constraint , std::move ( rotation) });
381381 }
382382
383383 sequence->addSegment (segment);
@@ -432,7 +432,7 @@ namespace animation {
432432 } else
433433 constraint = std::shared_ptr<ik_constraint>(new ik_constraint ());
434434
435- chain.push_back ({submodel, constraint, acceleration});
435+ chain.push_back ({std::move ( submodel) , constraint, acceleration});
436436 }
437437
438438 return std::shared_ptr<ModelAnimationMoveable>(new ModelAnimationMoveableIK (chain, time));
0 commit comments