summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-28 23:43:11 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-28 23:43:11 +0200
commit894ae2d74217f4c37653022d855d00fd46c39457 (patch)
tree443af7c7b6ff0909e691cba39d7b8577d1900381 /src/render
parent08e0567d3ae348f950aacbb734ead61b0d8eebe1 (diff)
Use C++-styled pointers for decorations
Diffstat (limited to 'src/render')
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp
index a677638c..25d74065 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.cpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.cpp
@@ -37,9 +37,8 @@ void CHyprGroupBarDecoration::updateWindow(CWindow* pWindow) {
if (g_pLayoutManager->getCurrentLayout()->getLayoutName() != "dwindle") {
// ????
for (auto it = pWindow->m_dWindowDecorations.begin(); it != pWindow->m_dWindowDecorations.end(); it++) {
- if ((*it) == this) {
+ if (it->get() == this) {
pWindow->m_dWindowDecorations.erase(it);
- delete this;
return;
}
}
@@ -56,9 +55,8 @@ void CHyprGroupBarDecoration::updateWindow(CWindow* pWindow) {
if (m_dwGroupMembers.size() == 0) {
// remove
for (auto it = pWindow->m_dWindowDecorations.begin(); it != pWindow->m_dWindowDecorations.end(); it++) {
- if ((*it) == this) {
+ if (it->get() == this) {
pWindow->m_dWindowDecorations.erase(it);
- delete this;
return;
}
}