diff options
| author | vaxerski <vaxry@vaxry.net> | 2025-01-02 18:14:45 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2025-01-02 18:14:45 +0100 |
| commit | 1697171fc003d26dace4a7d70e2f8038df60a196 (patch) | |
| tree | e7df4d065746686e9c2b263687d99440c621fc62 /src/render/pass/Pass.cpp | |
| parent | 81721b8aa87b1df3c3a9c9eadafcc271178c102a (diff) | |
pass: allow removing all pass elements of a given type
Diffstat (limited to 'src/render/pass/Pass.cpp')
| -rw-r--r-- | src/render/pass/Pass.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/render/pass/Pass.cpp b/src/render/pass/Pass.cpp index 8fdc3049..3e1282f0 100644 --- a/src/render/pass/Pass.cpp +++ b/src/render/pass/Pass.cpp @@ -247,3 +247,7 @@ float CRenderPass::oneBlurRadius() { static auto PBLURPASSES = CConfigValue<Hyprlang::INT>("decoration:blur:passes"); return *PBLURPASSES > 10 ? pow(2, 15) : std::clamp(*PBLURSIZE, (int64_t)1, (int64_t)40) * pow(2, *PBLURPASSES); // is this 2^pass? I don't know but it works... I think. } + +void CRenderPass::removeAllOfType(const std::string& type) { + std::erase_if(m_vPassElements, [&type](const auto& e) { return e->element->passName() == type; }); +} |
