diff options
| author | Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> | 2025-12-14 19:46:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-14 19:46:49 +0000 |
| commit | 7ccc57eb7cacded5e7a8835b705bba48963d3cb3 (patch) | |
| tree | 0bc87ed7beeeb19039bd3a40bf1c3febc36c851b /src/managers/animation/AnimationManager.hpp | |
| parent | e4a8f2b14f789075612bfd26e8153039c8f295f2 (diff) | |
animation: migrate PHLANIMVAR from SP to UP (#12486)
Diffstat (limited to 'src/managers/animation/AnimationManager.hpp')
| -rw-r--r-- | src/managers/animation/AnimationManager.hpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/managers/animation/AnimationManager.hpp b/src/managers/animation/AnimationManager.hpp index 2f411879..b8acc53e 100644 --- a/src/managers/animation/AnimationManager.hpp +++ b/src/managers/animation/AnimationManager.hpp @@ -22,13 +22,11 @@ class CHyprAnimationManager : public Hyprutils::Animation::CAnimationManager { template <Animable VarType> void createAnimation(const VarType& v, PHLANIMVAR<VarType>& pav, SP<SAnimationPropertyConfig> pConfig, eAVarDamagePolicy policy) { constexpr const eAnimatedVarType EAVTYPE = typeToeAnimatedVarType<VarType>; - const auto PAV = makeShared<CAnimatedVariable<VarType>>(); + pav = makeUnique<CAnimatedVariable<VarType>>(); - PAV->create(EAVTYPE, sc<Hyprutils::Animation::CAnimationManager*>(this), PAV, v); - PAV->setConfig(pConfig); - PAV->m_Context.eDamagePolicy = policy; - - pav = std::move(PAV); + pav->create2(EAVTYPE, sc<Hyprutils::Animation::CAnimationManager*>(this), pav, v); + pav->setConfig(pConfig); + pav->m_Context.eDamagePolicy = policy; } template <Animable VarType> |
