From a585fc40cce663e64e593a5f33a6c2d00d2b342c Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Wed, 22 Apr 2020 23:58:01 +0200 Subject: [PATCH] Remove some useless "typedef wxX X" --- src/gui/set/cards_panel.cpp | 2 +- src/gui/set/cards_panel.hpp | 2 +- src/gui/set/console_panel.cpp | 2 +- src/gui/set/keywords_panel.cpp | 2 +- src/gui/symbol/window.hpp | 2 +- src/gui/welcome_window.cpp | 2 +- src/gui/welcome_window.hpp | 2 +- src/util/io/reader.cpp | 2 +- src/util/prec.hpp | 2 -- 9 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/gui/set/cards_panel.cpp b/src/gui/set/cards_panel.cpp index bdd6d327..f58338c3 100644 --- a/src/gui/set/cards_panel.cpp +++ b/src/gui/set/cards_panel.cpp @@ -44,7 +44,7 @@ CardsPanel::CardsPanel(Window* parent, int id) editor = new CardEditor(this, ID_EDITOR); splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); card_list = new FilteredImageCardList(splitter, ID_CARD_LIST); - nodes_panel = new Panel(splitter, wxID_ANY); + nodes_panel = new wxPanel(splitter, wxID_ANY); notes = new TextCtrl(nodes_panel, ID_NOTES, true); collapse_notes = new HoverButton(nodes_panel, ID_COLLAPSE_NOTES, _("btn_collapse"), wxNullColour, false); collapse_notes->SetExtraStyle(wxWS_EX_PROCESS_UI_UPDATES); diff --git a/src/gui/set/cards_panel.hpp b/src/gui/set/cards_panel.hpp index 883fb1b6..533ac9ef 100644 --- a/src/gui/set/cards_panel.hpp +++ b/src/gui/set/cards_panel.hpp @@ -78,7 +78,7 @@ class CardsPanel : public SetWindowPanel { wxSplitterWindow* splitter; DataEditor* editor; FilteredImageCardList* card_list; - Panel* nodes_panel; + wxPanel* nodes_panel; TextCtrl* notes; HoverButton* collapse_notes; FilterCtrl* filter; diff --git a/src/gui/set/console_panel.cpp b/src/gui/set/console_panel.cpp index 89c10a17..c64b5a20 100644 --- a/src/gui/set/console_panel.cpp +++ b/src/gui/set/console_panel.cpp @@ -301,7 +301,7 @@ ConsolePanel::ConsolePanel(Window* parent, int id) // init controls splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); messages = new MessageCtrl(splitter, ID_MESSAGE_LIST); - entry_panel = new Panel(splitter, wxID_ANY); + entry_panel = new wxPanel(splitter, wxID_ANY); entry = new wxTextCtrl(entry_panel, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER); wxButton* evaluate = new wxButton(entry_panel, ID_EVALUATE, _BUTTON_("evaluate")); // init sizer for entry_panel diff --git a/src/gui/set/keywords_panel.cpp b/src/gui/set/keywords_panel.cpp index 693e5999..9785f3eb 100644 --- a/src/gui/set/keywords_panel.cpp +++ b/src/gui/set/keywords_panel.cpp @@ -40,7 +40,7 @@ void KeywordsPanel::initControls() { // init controls splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); list = new KeywordList(splitter, ID_KEYWORD_LIST); - panel = new Panel(splitter, wxID_ANY); + panel = new wxPanel(splitter, wxID_ANY); keyword = new TextCtrl(panel, ID_KEYWORD, false); mode = new wxChoice(panel, ID_KEYWORD_MODE, wxDefaultPosition, wxDefaultSize, 0, nullptr); match = new TextCtrl(panel, ID_MATCH, false); diff --git a/src/gui/symbol/window.hpp b/src/gui/symbol/window.hpp index 46a8028f..0181d1ca 100644 --- a/src/gui/symbol/window.hpp +++ b/src/gui/symbol/window.hpp @@ -20,7 +20,7 @@ DECLARE_POINTER_TYPE(ValueActionPerformer); // ----------------------------------------------------------------------------- : SymbolWindow /// The window for editing symbols -class SymbolWindow : public Frame { +class SymbolWindow : public wxFrame { public: /// Construct a SymbolWindow SymbolWindow(Window* parent); diff --git a/src/gui/welcome_window.cpp b/src/gui/welcome_window.cpp index 0afda4bb..e9dfb89b 100644 --- a/src/gui/welcome_window.cpp +++ b/src/gui/welcome_window.cpp @@ -25,7 +25,7 @@ // ----------------------------------------------------------------------------- : WelcomeWindow WelcomeWindow::WelcomeWindow() - : Frame(nullptr, wxID_ANY, _TITLE_("magic set editor"), wxDefaultPosition, wxSize(520,380), wxDEFAULT_DIALOG_STYLE | wxTAB_TRAVERSAL | wxCLIP_CHILDREN ) + : wxFrame(nullptr, wxID_ANY, _TITLE_("magic set editor"), wxDefaultPosition, wxSize(520,380), wxDEFAULT_DIALOG_STYLE | wxTAB_TRAVERSAL | wxCLIP_CHILDREN ) , logo (load_resource_image(_("about"))) #if USE_BETA_LOGO , logo2(load_resource_image(_("two_beta"))) diff --git a/src/gui/welcome_window.hpp b/src/gui/welcome_window.hpp index 5b50c061..4f39b700 100644 --- a/src/gui/welcome_window.hpp +++ b/src/gui/welcome_window.hpp @@ -24,7 +24,7 @@ DECLARE_POINTER_TYPE(Set); * in the future also: * - new game, new style? */ -class WelcomeWindow : public Frame { +class WelcomeWindow : public wxFrame { public: WelcomeWindow(); diff --git a/src/util/io/reader.cpp b/src/util/io/reader.cpp index 745e0023..0ad6f92d 100644 --- a/src/util/io/reader.cpp +++ b/src/util/io/reader.cpp @@ -96,7 +96,7 @@ bool Reader::enterAnyBlock() { bool Reader::enterBlock(const Char* name) { if (state == ENTERED) moveNext(); // on the key of the parent block, first move inside it if (indent != expected_indent) return false; // not enough indentation - if (canonical_name_compare(key, name)) { + if (key == name) { state = ENTERED; expected_indent += 1; // the indent inside the block must be at least this much return true; diff --git a/src/util/prec.hpp b/src/util/prec.hpp index 988849f8..f2acbadd 100644 --- a/src/util/prec.hpp +++ b/src/util/prec.hpp @@ -49,9 +49,7 @@ using namespace std; // Remove some of the wxUglyness -typedef wxPanel Panel; typedef wxWindow Window; -typedef wxFrame Frame; typedef wxBitmap Bitmap; typedef wxImage Image;