From 795701c9865c050c4685335d77bc401d0e80ea54 Mon Sep 17 00:00:00 2001 From: John McCardle Date: Wed, 30 Aug 2023 14:50:27 -0400 Subject: [PATCH] Cleanup: less curly braces in destructor --- src/UI.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/UI.cpp b/src/UI.cpp index 97f4b35..01a17b4 100644 --- a/src/UI.cpp +++ b/src/UI.cpp @@ -27,10 +27,10 @@ x(_x), y(_y), w(_w), h(_h), outline(0) UIFrame::~UIFrame() { - if (pyOutlineColor) { Py_DECREF(pyOutlineColor); } - else { if (_outlineColor) { delete _outlineColor; } } - if (pyFillColor) { Py_DECREF(pyFillColor); } - else { if (_fillColor) { delete _fillColor; } } + if (pyOutlineColor) Py_DECREF(pyOutlineColor); + else if (_outlineColor) delete _outlineColor; + if (pyFillColor) Py_DECREF(pyFillColor); + else if (_fillColor) delete _fillColor; } /*