summaryrefslogtreecommitdiff
path: root/src/render/pass/Pass.hpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-07-10 10:44:59 +0200
committerVaxry <43317083+vaxerski@users.noreply.github.com>2025-07-10 14:09:00 +0200
commitf5af40afce9d453dbf2e5bab739520e1cb80ab12 (patch)
tree05d4d51d900e07972c1739c6c20fa3ff07201eaf /src/render/pass/Pass.hpp
parent6375e471f33bf1a008a005e963c57a12c7ff0e94 (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/render/pass/Pass.hpp')
-rw-r--r--src/render/pass/Pass.hpp6
1 files changed, 3 insertions, 3 deletions
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<IPassElement> elem);
+ void add(UP<IPassElement>&& elem);
void clear();
void removeAllOfType(const std::string& type);
@@ -24,11 +24,11 @@ class CRenderPass {
struct SPassElementData {
CRegion elementDamage;
- SP<IPassElement> element;
+ UP<IPassElement> element;
bool discard = false;
};
- std::vector<SP<SPassElementData>> m_passElements;
+ std::vector<UP<SPassElementData>> m_passElements;
void simplify();
float oneBlurRadius();