summaryrefslogtreecommitdiff
path: root/src/managers/AnimationManager.cpp
diff options
context:
space:
mode:
authorKamikadze <40305144+Kam1k4dze@users.noreply.github.com>2025-08-14 19:44:56 +0500
committerGitHub <noreply@github.com>2025-08-14 15:44:56 +0100
commitbeee22a95ed9044950e5486f22edd813e00ffa2c (patch)
tree4612fa3d9b17275d417a059c19f998c64e871997 /src/managers/AnimationManager.cpp
parentaa6a78f0a4e17c49ed4aff8b58c3f7ec7ef0408f (diff)
refactor: Use new hyprutils casts (#11377)
Diffstat (limited to 'src/managers/AnimationManager.cpp')
-rw-r--r--src/managers/AnimationManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp
index a5ede0e5..aac4a869 100644
--- a/src/managers/AnimationManager.cpp
+++ b/src/managers/AnimationManager.cpp
@@ -228,17 +228,17 @@ void CHyprAnimationManager::tick() {
switch (PAV->m_Type) {
case AVARTYPE_FLOAT: {
- auto pTypedAV = dynamic_cast<CAnimatedVariable<float>*>(PAV.get());
+ auto pTypedAV = dc<CAnimatedVariable<float>*>(PAV.get());
RASSERT(pTypedAV, "Failed to upcast animated float");
handleUpdate(*pTypedAV, warp);
} break;
case AVARTYPE_VECTOR: {
- auto pTypedAV = dynamic_cast<CAnimatedVariable<Vector2D>*>(PAV.get());
+ auto pTypedAV = dc<CAnimatedVariable<Vector2D>*>(PAV.get());
RASSERT(pTypedAV, "Failed to upcast animated Vector2D");
handleUpdate(*pTypedAV, warp);
} break;
case AVARTYPE_COLOR: {
- auto pTypedAV = dynamic_cast<CAnimatedVariable<CHyprColor>*>(PAV.get());
+ auto pTypedAV = dc<CAnimatedVariable<CHyprColor>*>(PAV.get());
RASSERT(pTypedAV, "Failed to upcast animated CHyprColor");
handleUpdate(*pTypedAV, warp);
} break;
@@ -268,7 +268,7 @@ void CHyprAnimationManager::scheduleTick() {
const auto TOPRES = std::clamp(refreshDelayMs - SINCEPRES, 1.1f, 1000.f); // we can't send 0, that will disarm it
- m_animationTimer->updateTimeout(std::chrono::milliseconds((int)std::floor(TOPRES)));
+ m_animationTimer->updateTimeout(std::chrono::milliseconds(sc<int>(std::floor(TOPRES))));
}
void CHyprAnimationManager::onTicked() {