diff options
author | Ikalco <[email protected]> | 2024-12-17 10:31:27 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2024-12-17 17:31:27 +0100 |
commit | e2c78c00e50a0835c3830c8a0cd82049dc5700b8 (patch) | |
tree | 7ac17c752f1569e60a63e5356e199de6968cbb0e /src/helpers | |
parent | bd7092a9feb39275a9eb1426046a46671e0fe580 (diff) | |
download | Hyprland-e2c78c00e50a0835c3830c8a0cd82049dc5700b8.tar.gz Hyprland-e2c78c00e50a0835c3830c8a0cd82049dc5700b8.zip |
internal: remove dead code (#8748)
Diffstat (limited to 'src/helpers')
-rw-r--r-- | src/helpers/AnimatedVariable.cpp | 5 | ||||
-rw-r--r-- | src/helpers/AnimatedVariable.hpp | 2 | ||||
-rw-r--r-- | src/helpers/MiscFunctions.cpp | 20 | ||||
-rw-r--r-- | src/helpers/MiscFunctions.hpp | 2 |
4 files changed, 0 insertions, 29 deletions
diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp index 6deeff39..ab5643a6 100644 --- a/src/helpers/AnimatedVariable.cpp +++ b/src/helpers/AnimatedVariable.cpp @@ -55,11 +55,6 @@ void CBaseAnimatedVariable::registerVar() { m_bIsRegistered = true; } -int CBaseAnimatedVariable::getDurationLeftMs() { - return std::max( - (int)(m_pConfig->pValues->internalSpeed * 100) - (int)std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - animationBegin).count(), 0); -} - float CBaseAnimatedVariable::getPercent() { const auto DURATIONPASSED = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - animationBegin).count(); return std::clamp((DURATIONPASSED / 100.f) / m_pConfig->pValues->internalSpeed, 0.f, 1.f); diff --git a/src/helpers/AnimatedVariable.hpp b/src/helpers/AnimatedVariable.hpp index a2a06675..a1da00da 100644 --- a/src/helpers/AnimatedVariable.hpp +++ b/src/helpers/AnimatedVariable.hpp @@ -95,8 +95,6 @@ class CBaseAnimatedVariable { return m_pConfig; } - int getDurationLeftMs(); - /* returns the spent (completion) % */ float getPercent(); diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 9b92c63d..6d365161 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -161,26 +161,6 @@ std::string absolutePath(const std::string& rawpath, const std::string& currentP return value; } -void addWLSignal(wl_signal* pSignal, wl_listener* pListener, void* pOwner, const std::string& ownerString) { - ASSERT(pSignal); - ASSERT(pListener); - - wl_signal_add(pSignal, pListener); - - Debug::log(LOG, "Registered signal for owner {:x}: {:x} -> {:x} (owner: {})", (uintptr_t)pOwner, (uintptr_t)pSignal, (uintptr_t)pListener, ownerString); -} - -void removeWLSignal(wl_listener* pListener) { - wl_list_remove(&pListener->link); - wl_list_init(&pListener->link); - - Debug::log(LOG, "Removed listener {:x}", (uintptr_t)pListener); -} - -void handleNoop(struct wl_listener* listener, void* data) { - // Do nothing -} - std::string escapeJSONStrings(const std::string& str) { std::ostringstream oss; for (auto const& c : str) { diff --git a/src/helpers/MiscFunctions.hpp b/src/helpers/MiscFunctions.hpp index 018efbed..b179b3d6 100644 --- a/src/helpers/MiscFunctions.hpp +++ b/src/helpers/MiscFunctions.hpp @@ -21,8 +21,6 @@ struct SWorkspaceIDName { }; std::string absolutePath(const std::string&, const std::string&); -void addWLSignal(wl_signal*, wl_listener*, void* pOwner, const std::string& ownerString); -void removeWLSignal(wl_listener*); std::string escapeJSONStrings(const std::string& str); bool isDirection(const std::string&); bool isDirection(const char&); |