From f5af40afce9d453dbf2e5bab739520e1cb80ab12 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Thu, 10 Jul 2025 10:44:59 +0200 Subject: 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. --- src/render/pass/Pass.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/render/pass/Pass.hpp') diff --git a/src/render/pass/Pass.hpp b/src/render/pass/Pass.hpp index ac564689..435b5301 100644 --- a/src/render/pass/Pass.hpp +++ b/src/render/pass/Pass.hpp @@ -11,7 +11,7 @@ class CRenderPass { bool empty() const; bool single() const; - void add(SP elem); + void add(UP&& elem); void clear(); void removeAllOfType(const std::string& type); @@ -24,11 +24,11 @@ class CRenderPass { struct SPassElementData { CRegion elementDamage; - SP element; + UP element; bool discard = false; }; - std::vector> m_passElements; + std::vector> m_passElements; void simplify(); float oneBlurRadius(); -- cgit v1.2.3