From e9b799270b6d75149fae85d6289801559d5d0880 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 31 Oct 2023 03:44:53 +0100 Subject: [PATCH] More minor code simplifications Remove unnecessary variable and macro. --- src/xrc/xh_propgrid.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/xrc/xh_propgrid.cpp b/src/xrc/xh_propgrid.cpp index c98b572f77..f14bd552f5 100644 --- a/src/xrc/xh_propgrid.cpp +++ b/src/xrc/xh_propgrid.cpp @@ -163,12 +163,9 @@ wxObject *wxPropertyGridXmlHandler::DoCreateResource() if ( property->GetChildCount() ) { - wxPGProperty* pwc = property; - - // FIXME wxString sExpanded(wxT("expanded")); if ( HasParam(sExpanded) ) - pwc->SetExpanded(GetBool(sExpanded)); + property->SetExpanded(GetBool(sExpanded)); } // Need to call AddChildren even for non-parent properties for attributes and such @@ -279,8 +276,6 @@ wxObject *wxPropertyGridXmlHandler::DoCreateResource() bool wxPropertyGridXmlHandler::CanHandle(wxXmlNode *node) { - #define fOurClass(A) IsOfClass(node, A) - wxString name = node->GetName(); return ( @@ -292,8 +287,8 @@ bool wxPropertyGridXmlHandler::CanHandle(wxXmlNode *node) ) ) || (m_manager && name == wxT("page")) || - (!m_populator && fOurClass(wxT("wxPropertyGrid"))) || - (!m_populator && fOurClass(wxT("wxPropertyGridManager"))) + (!m_populator && IsOfClass(node, wxT("wxPropertyGrid"))) || + (!m_populator && IsOfClass(node, wxT("wxPropertyGridManager"))) ); }