From d5689bb53935ff1adbbfc9fdf5b1f542ce39efb2 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 26 Oct 2024 02:06:13 +0100 Subject: internal: cleanup CMonitor usage and fix a few ref hogs ref #8221 --- src/helpers/Monitor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/helpers/Monitor.cpp') diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index d8889585..41290b7d 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -71,7 +71,7 @@ void CMonitor::onConnect(bool noRule) { Debug::log(LOG, "Removing monitor {} from realMonitors", szName); - std::erase_if(g_pCompositor->m_vRealMonitors, [&](SP& el) { return el.get() == this; }); + std::erase_if(g_pCompositor->m_vRealMonitors, [&](PHLMONITOR& el) { return el.get() == this; }); }); listeners.state = output->events.state.registerListener([this](std::any d) { @@ -149,7 +149,7 @@ void CMonitor::onConnect(bool noRule) { return; } - SP* thisWrapper = nullptr; + PHLMONITOR* thisWrapper = nullptr; // find the wrap for (auto& m : g_pCompositor->m_vRealMonitors) { @@ -356,7 +356,7 @@ void CMonitor::onDisconnect(bool destroy) { g_pHyprRenderer->m_pMostHzMonitor = pMonitorMostHz; } - std::erase_if(g_pCompositor->m_vMonitors, [&](SP& el) { return el.get() == this; }); + std::erase_if(g_pCompositor->m_vMonitors, [&](PHLMONITOR& el) { return el.get() == this; }); } void CMonitor::addDamage(const pixman_region32_t* rg) { @@ -509,7 +509,7 @@ void CMonitor::setMirror(const std::string& mirrorOf) { // push to mvmonitors - SP* thisWrapper = nullptr; + PHLMONITOR* thisWrapper = nullptr; // find the wrap for (auto& m : g_pCompositor->m_vRealMonitors) { -- cgit v1.2.3