diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2025-07-10 10:44:59 +0200 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-07-10 14:09:00 +0200 |
| commit | f5af40afce9d453dbf2e5bab739520e1cb80ab12 (patch) | |
| tree | 05d4d51d900e07972c1739c6c20fa3ff07201eaf /src/debug | |
| parent | 6375e471f33bf1a008a005e963c57a12c7ff0e94 (diff) | |
renderpass: use unique ptr instead of shared ptr
lets use unique ptrs instead of refcounting shared ptr when its not
needed, use rvalue reference to construct in vector directly.
Diffstat (limited to 'src/debug')
| -rw-r--r-- | src/debug/HyprDebugOverlay.cpp | 2 | ||||
| -rw-r--r-- | src/debug/HyprNotificationOverlay.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/debug/HyprDebugOverlay.cpp b/src/debug/HyprDebugOverlay.cpp index 8f79f2fe..572f56a8 100644 --- a/src/debug/HyprDebugOverlay.cpp +++ b/src/debug/HyprDebugOverlay.cpp @@ -271,5 +271,5 @@ void CHyprDebugOverlay::draw() { CTexPassElement::SRenderData data; data.tex = m_texture; data.box = {0, 0, PMONITOR->m_pixelSize.x, PMONITOR->m_pixelSize.y}; - g_pHyprRenderer->m_renderPass.add(makeShared<CTexPassElement>(std::move(data))); + g_pHyprRenderer->m_renderPass.add(makeUnique<CTexPassElement>(std::move(data))); } diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp index 68f5e356..1e244446 100644 --- a/src/debug/HyprNotificationOverlay.cpp +++ b/src/debug/HyprNotificationOverlay.cpp @@ -248,7 +248,7 @@ void CHyprNotificationOverlay::draw(PHLMONITOR pMonitor) { data.box = {0, 0, MONSIZE.x, MONSIZE.y}; data.a = 1.F; - g_pHyprRenderer->m_renderPass.add(makeShared<CTexPassElement>(std::move(data))); + g_pHyprRenderer->m_renderPass.add(makeUnique<CTexPassElement>(std::move(data))); } bool CHyprNotificationOverlay::hasAny() { |
