From 155885a3ddcbbebf061dd9ca2548efe05eba174a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Dec 2019 14:47:51 +0100 Subject: [PATCH] Reformat splitter sample to follow wx style guidelines Put "{" and "}" on their own lines. Also use spaces around "if" condition and omit unnecessary comparisons with NULL. No real changes. See https://github.com/wxWidgets/wxWidgets/pull/1672 --- samples/splitter/splitter.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/samples/splitter/splitter.cpp b/samples/splitter/splitter.cpp index 6c6cd76f2b..c7be5aba40 100644 --- a/samples/splitter/splitter.cpp +++ b/samples/splitter/splitter.cpp @@ -321,7 +321,8 @@ MyFrame::MyFrame() MyFrame::~MyFrame() { - if (m_replacewindow) { + if ( m_replacewindow ) + { m_replacewindow->Destroy(); } } @@ -446,13 +447,17 @@ void MyFrame::OnSetGravity(wxCommandEvent& WXUNUSED(event) ) void MyFrame::OnReplace(wxCommandEvent& WXUNUSED(event) ) { - if (m_replacewindow == NULL) { + if ( !m_replacewindow ) + { m_replacewindow = m_splitter->GetWindow2(); - if (m_replacewindow != NULL) { + if ( m_replacewindow ) + { m_splitter->ReplaceWindow(m_replacewindow, new wxPanel(m_splitter, wxID_ANY)); m_replacewindow->Hide(); } - } else { + } + else + { wxWindow *empty = m_splitter->GetWindow2(); wxASSERT(empty != m_replacewindow); m_splitter->ReplaceWindow(empty, m_replacewindow);