From 12884c94dcad8f502cc593972e6718435fbb0c16 Mon Sep 17 00:00:00 2001 From: AI-scor <354880559+AI-scor@users.noreply.github.com> Date: Tue, 10 Nov 2026 18:51:43 +0100 Subject: [PATCH] Apply typedef across the tree (#7880) --- cockatrice/src/client/sound_engine.h | 2 +- cockatrice/src/filters/deck_filter_string.h | 2 +- cockatrice/src/interface/theme_manager.h | 4 ++-- .../src/interface/widgets/server/game_type_map.h | 2 +- libcockatrice_card/libcockatrice/card/card_info.h | 14 +++++++------- .../libcockatrice/filters/filter_string.h | 12 ++++++------ .../libcockatrice/utility/expression.h | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cockatrice/src/client/sound_engine.h b/cockatrice/src/client/sound_engine.h index 8167c71b5..2917b075a 100644 --- a/cockatrice/src/client/sound_engine.h +++ b/cockatrice/src/client/sound_engine.h @@ -18,7 +18,7 @@ class QMediaPlayer; inline Q_LOGGING_CATEGORY(SoundEngineLog, "sound_engine"); -typedef QMap QStringMap; +using QStringMap = QMap; class SoundEngine : public QObject { diff --git a/cockatrice/src/filters/deck_filter_string.h b/cockatrice/src/filters/deck_filter_string.h index b27cf87ca..aad111505 100644 --- a/cockatrice/src/filters/deck_filter_string.h +++ b/cockatrice/src/filters/deck_filter_string.h @@ -32,7 +32,7 @@ struct DeckSearchData QString relativeFilePath; ///< File path relative to the deck folder. }; -typedef std::function DeckFilter; +using DeckFilter = std::function; class DeckFilterString { diff --git a/cockatrice/src/interface/theme_manager.h b/cockatrice/src/interface/theme_manager.h index 21a23bb16..aafedc8f8 100644 --- a/cockatrice/src/interface/theme_manager.h +++ b/cockatrice/src/interface/theme_manager.h @@ -23,8 +23,8 @@ inline Q_LOGGING_CATEGORY(ThemeManagerLog, "theme_manager"); -typedef QMap QStringMap; -typedef QMap QBrushMap; +using QStringMap = QMap; +using QBrushMap = QMap; class ThemeManager : public QObject { diff --git a/cockatrice/src/interface/widgets/server/game_type_map.h b/cockatrice/src/interface/widgets/server/game_type_map.h index 0235b4720..0dcc0d8fe 100644 --- a/cockatrice/src/interface/widgets/server/game_type_map.h +++ b/cockatrice/src/interface/widgets/server/game_type_map.h @@ -3,6 +3,6 @@ #include -typedef QMap GameTypeMap; +using GameTypeMap = QMap; #endif diff --git a/libcockatrice_card/libcockatrice/card/card_info.h b/libcockatrice_card/libcockatrice/card/card_info.h index 075b5b264..45594bfd8 100644 --- a/libcockatrice_card/libcockatrice/card/card_info.h +++ b/libcockatrice_card/libcockatrice/card/card_info.h @@ -27,14 +27,14 @@ class CardInfo; class CardSet; class CardRelation; -typedef QSharedPointer CardInfoPtr; -typedef QSharedPointer CardSetPtr; -typedef QSharedPointer FormatRulesPtr; -typedef QMap> SetToPrintingsMap; +using CardInfoPtr = QSharedPointer; +using CardSetPtr = QSharedPointer; +using FormatRulesPtr = QSharedPointer; +using SetToPrintingsMap = QMap>; -typedef QHash CardNameMap; -typedef QHash SetNameMap; -typedef QHash FormatRulesNameMap; +using CardNameMap = QHash; +using SetNameMap = QHash; +using FormatRulesNameMap = QHash; Q_DECLARE_METATYPE(CardInfoPtr) diff --git a/libcockatrice_filters/libcockatrice/filters/filter_string.h b/libcockatrice_filters/libcockatrice/filters/filter_string.h index 34e2bfb35..026016045 100644 --- a/libcockatrice_filters/libcockatrice/filters/filter_string.h +++ b/libcockatrice_filters/libcockatrice/filters/filter_string.h @@ -18,18 +18,18 @@ struct CardSearchLanguage; inline Q_LOGGING_CATEGORY(FilterStringLog, "filter_string"); -typedef CardInfoPtr CardData; -typedef std::function Filter; -typedef std::function StringMatcher; -typedef std::function NumberMatcher; -typedef std::function NumberComparer; +using CardData = CardInfoPtr; +using Filter = std::function; +using StringMatcher = std::function; +using NumberMatcher = std::function; +using NumberComparer = std::function; namespace peg { template struct AstBase; struct EmptyType; -typedef AstBase Ast; +using Ast = AstBase; } // namespace peg class FilterString diff --git a/libcockatrice_utility/libcockatrice/utility/expression.h b/libcockatrice_utility/libcockatrice/utility/expression.h index 8c6a94932..53dfa51a6 100644 --- a/libcockatrice_utility/libcockatrice/utility/expression.h +++ b/libcockatrice_utility/libcockatrice/utility/expression.h @@ -9,7 +9,7 @@ namespace peg { template struct AstBase; struct EmptyType; -typedef AstBase Ast; +using Ast = AstBase; } // namespace peg class Expression