#include using namespace Aquamarine; using namespace Hyprutils::Memory; #define SP CSharedPointer bool Aquamarine::CAttachmentManager::has(eAttachmentType type) { for (auto& a : attachments) { if (a->type() == type) return true; } return false; } SP Aquamarine::CAttachmentManager::get(eAttachmentType type) { for (auto& a : attachments) { if (a->type() == type) return a; } return nullptr; } void Aquamarine::CAttachmentManager::add(SP attachment) { attachments.emplace_back(attachment); } void Aquamarine::CAttachmentManager::remove(SP attachment) { std::erase(attachments, attachment); } void Aquamarine::CAttachmentManager::removeByType(eAttachmentType type) { std::erase_if(attachments, [type](const auto& e) { return e->type() == type; }); }