From 4327abb80328fc0a6a0559d4e16a8b2c9ee4e283 Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Sun, 26 Apr 2020 00:51:16 +0200 Subject: [PATCH] Remove DECLARE_TYPEOF It is no longer needed since C++11 --- src/cli/cli_main.cpp | 3 --- src/data/action/keyword.cpp | 2 -- src/data/action/keyword.hpp | 1 - src/data/action/set.cpp | 5 ----- src/data/action/set.hpp | 2 -- src/data/action/symbol.cpp | 6 ------ src/data/action/symbol_part.cpp | 4 ---- src/data/card.cpp | 3 --- src/data/field.cpp | 2 -- src/data/field/choice.cpp | 3 --- src/data/field/color.cpp | 2 -- src/data/format/apprentice.cpp | 9 --------- src/data/format/image.cpp | 2 -- src/data/format/image_to_symbol.cpp | 3 --- src/data/format/mtg_editor.cpp | 2 -- src/data/format/mws.cpp | 2 -- src/data/game.cpp | 3 --- src/data/keyword.cpp | 6 ------ src/data/locale.cpp | 2 -- src/data/pack.cpp | 5 ----- src/data/set.cpp | 3 --- src/data/settings.cpp | 2 -- src/data/statistics.cpp | 4 ---- src/data/stylesheet.cpp | 3 --- src/data/symbol.cpp | 3 --- src/data/symbol_font.cpp | 4 ---- src/gui/auto_replace_window.cpp | 2 -- src/gui/card_select_window.cpp | 3 --- src/gui/control/card_editor.cpp | 3 --- src/gui/control/card_list.cpp | 5 ----- src/gui/control/card_list_column_select.cpp | 3 --- src/gui/control/filtered_card_list.cpp | 2 -- src/gui/control/gallery_list.cpp | 2 -- src/gui/control/graph.cpp | 12 ------------ src/gui/control/image_card_list.cpp | 2 -- src/gui/control/keyword_list.cpp | 3 --- src/gui/control/native_look_editor.cpp | 3 --- src/gui/control/package_list.cpp | 2 -- src/gui/control/select_card_list.cpp | 2 -- src/gui/control/text_ctrl.cpp | 2 -- src/gui/control/tree_list.cpp | 2 -- src/gui/images_export_window.cpp | 2 -- src/gui/package_update_list.cpp | 5 ----- src/gui/packages_window.cpp | 4 ---- src/gui/preferences_window.cpp | 2 -- src/gui/print_window.cpp | 1 - src/gui/profiler_window.cpp | 2 -- src/gui/set/cards_panel.cpp | 2 -- src/gui/set/console_panel.cpp | 2 -- src/gui/set/keywords_panel.cpp | 4 ---- src/gui/set/random_pack_panel.cpp | 5 ----- src/gui/set/stats_panel.cpp | 7 ------- src/gui/set/style_panel.cpp | 2 -- src/gui/set/window.cpp | 4 ---- src/gui/symbol/part_list.cpp | 2 -- src/gui/symbol/point_editor.cpp | 2 -- src/gui/symbol/select_editor.cpp | 2 -- src/gui/symbol/selection.cpp | 2 -- src/gui/thumbnail_thread.cpp | 3 --- src/gui/update_checker.cpp | 1 - src/gui/value/choice.cpp | 2 -- src/gui/value/color.cpp | 2 -- src/gui/value/package_choice.cpp | 2 -- src/gui/value/text.cpp | 7 ------- src/render/card/viewer.cpp | 3 --- src/render/symbol/viewer.cpp | 2 -- src/render/text/element.cpp | 1 - src/render/text/viewer.cpp | 3 --- src/render/value/color.cpp | 2 -- src/render/value/multiple_choice.cpp | 2 -- src/render/value/package_choice.cpp | 3 --- src/render/value/symbol.cpp | 2 -- src/render/value/viewer.cpp | 2 -- src/script/dependency.cpp | 3 --- src/script/functions/basic.cpp | 2 -- src/script/functions/editor.cpp | 6 ------ src/script/functions/export.cpp | 4 ---- src/script/functions/image.cpp | 2 -- src/script/functions/regex.cpp | 1 - src/script/parser.cpp | 2 -- src/script/profiler.cpp | 2 -- src/script/script.cpp | 3 --- src/script/scriptable.cpp | 2 -- src/script/value.cpp | 2 -- src/util/action_stack.cpp | 3 --- src/util/error.cpp | 2 -- src/util/file_utils.cpp | 2 -- src/util/for_each.hpp | 14 -------------- src/util/io/package.cpp | 3 --- src/util/io/package.hpp | 1 - src/util/io/package_manager.cpp | 4 ---- src/util/string.hpp | 2 -- 92 files changed, 281 deletions(-) diff --git a/src/cli/cli_main.cpp b/src/cli/cli_main.cpp index 7eacbbcb..4edca89f 100644 --- a/src/cli/cli_main.cpp +++ b/src/cli/cli_main.cpp @@ -16,8 +16,6 @@ #include #include -DECLARE_TYPEOF_COLLECTION(ScriptParseError); - String read_utf8_line(wxInputStream& input, bool until_eof = false); // ----------------------------------------------------------------------------- : Command line interface @@ -242,7 +240,6 @@ void CLISetInterface::handleCommand(const String& command) { } #if USE_SCRIPT_PROFILING - DECLARE_TYPEOF_COLLECTION(FunctionProfileP); void CLISetInterface::showProfilingStats(const FunctionProfile& item, int level) { // show parent if (level == 0) { diff --git a/src/data/action/keyword.cpp b/src/data/action/keyword.cpp index db805405..e1870c05 100644 --- a/src/data/action/keyword.cpp +++ b/src/data/action/keyword.cpp @@ -15,8 +15,6 @@ #include #include -DECLARE_TYPEOF_COLLECTION(KeywordModeP); - // ----------------------------------------------------------------------------- : Add Keyword AddKeywordAction::AddKeywordAction(Set& set) diff --git a/src/data/action/keyword.hpp b/src/data/action/keyword.hpp index b422c6e0..965d6c4c 100644 --- a/src/data/action/keyword.hpp +++ b/src/data/action/keyword.hpp @@ -22,7 +22,6 @@ class Set; DECLARE_POINTER_TYPE(Keyword); -DECLARE_TYPEOF_COLLECTION(GenericAddAction::Step); // ----------------------------------------------------------------------------- : Add Keyword diff --git a/src/data/action/set.cpp b/src/data/action/set.cpp index 39317673..1854463f 100644 --- a/src/data/action/set.cpp +++ b/src/data/action/set.cpp @@ -14,11 +14,6 @@ #include #include -DECLARE_TYPEOF_COLLECTION(IndexMap); -DECLARE_TYPEOF_COLLECTION(CardP); -DECLARE_TYPEOF_COLLECTION(PackTypeP); -DECLARE_TYPEOF_COLLECTION(int); - // ----------------------------------------------------------------------------- : Add card AddCardAction::AddCardAction(Set& set) diff --git a/src/data/action/set.hpp b/src/data/action/set.hpp index 38403fa4..779f6296 100644 --- a/src/data/action/set.hpp +++ b/src/data/action/set.hpp @@ -24,8 +24,6 @@ DECLARE_POINTER_TYPE(StyleSheet); DECLARE_POINTER_TYPE(Field); DECLARE_POINTER_TYPE(Value); DECLARE_POINTER_TYPE(PackType); -DECLARE_TYPEOF_COLLECTION(GenericAddAction::Step); -DECLARE_TYPEOF_COLLECTION(GenericAddAction::Step); // ----------------------------------------------------------------------------- : Add card diff --git a/src/data/action/symbol.cpp b/src/data/action/symbol.cpp index 05fe4870..61fde5dd 100644 --- a/src/data/action/symbol.cpp +++ b/src/data/action/symbol.cpp @@ -11,12 +11,6 @@ #include #include -DECLARE_TYPEOF_COLLECTION(pair); -DECLARE_TYPEOF_COLLECTION(pair); -DECLARE_TYPEOF_COLLECTION(RemoveSymbolPartsAction::Removal); -DECLARE_TYPEOF_COLLECTION(SymbolPartP); -DECLARE_TYPEOF_COLLECTION(ControlPointP); - // ----------------------------------------------------------------------------- : Utility String action_name_for(const set& parts, const String& action) { diff --git a/src/data/action/symbol_part.cpp b/src/data/action/symbol_part.cpp index 2ad832df..75ad3a8e 100644 --- a/src/data/action/symbol_part.cpp +++ b/src/data/action/symbol_part.cpp @@ -10,9 +10,6 @@ #include #include -DECLARE_TYPEOF_COLLECTION(Vector2D); -DECLARE_TYPEOF_COLLECTION(ControlPointP); - // ----------------------------------------------------------------------------- : Utility inline double sgn(double v) { return v > 0 ? 1 : -1; } @@ -384,7 +381,6 @@ void SinglePointRemoveAction::perform(bool to_undo) { } DECLARE_POINTER_TYPE(SinglePointRemoveAction); -DECLARE_TYPEOF_COLLECTION(SinglePointRemoveActionP); // Remove a set of points from a symbol shape. diff --git a/src/data/card.cpp b/src/data/card.cpp index 9441419d..6cce5a6f 100644 --- a/src/data/card.cpp +++ b/src/data/card.cpp @@ -15,9 +15,6 @@ #include #include -DECLARE_TYPEOF_COLLECTION(FieldP); -DECLARE_TYPEOF_NO_REV(IndexMap); - // ----------------------------------------------------------------------------- : Card Card::Card() diff --git a/src/data/field.cpp b/src/data/field.cpp index 2c5c885f..ae24908e 100644 --- a/src/data/field.cpp +++ b/src/data/field.cpp @@ -19,8 +19,6 @@ #include #include -DECLARE_TYPEOF_COLLECTION(StyleListener*); - // ----------------------------------------------------------------------------- : Field Field::Field() diff --git a/src/data/field/choice.cpp b/src/data/field/choice.cpp index b9a52955..ad54799c 100644 --- a/src/data/field/choice.cpp +++ b/src/data/field/choice.cpp @@ -12,9 +12,6 @@ #include #include -DECLARE_TYPEOF_COLLECTION(ChoiceField::ChoiceP); -DECLARE_TYPEOF(map); - // ----------------------------------------------------------------------------- : ChoiceField ChoiceField::ChoiceField() diff --git a/src/data/field/color.cpp b/src/data/field/color.cpp index d3c40723..267a104f 100644 --- a/src/data/field/color.cpp +++ b/src/data/field/color.cpp @@ -10,8 +10,6 @@ #include #include