From b7822ff511d3570336386e0ccd529c110eb150cd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 31 Mar 2017 17:15:03 +0200 Subject: [PATCH] Get rid of unnecessary helper function in the svg sample No real changes, just remove the trivial CreateNewPage() function which made the code less clear without any real gain. --- samples/svg/svgtest.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/samples/svg/svgtest.cpp b/samples/svg/svgtest.cpp index c9abc61363..d2a534e282 100644 --- a/samples/svg/svgtest.cpp +++ b/samples/svg/svgtest.cpp @@ -62,8 +62,6 @@ public: MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size); - MyPage *CreateNewPage(int index); - void FileSavePicture(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); void OnQuit(wxCommandEvent& event); @@ -148,17 +146,11 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, { wxString svgTitle; svgTitle.Printf(wxT("SVG Test %d"), i); - m_notebook->AddPage(CreateNewPage(i), svgTitle); + m_notebook->AddPage(new MyPage(m_notebook, i), svgTitle); } } -MyPage *MyFrame::CreateNewPage(int index) -{ - MyPage *page = new MyPage(m_notebook, index); - return page; -} - void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { Close();