From 9b65422d5a428557266e00dd2204b23befd0a670 Mon Sep 17 00:00:00 2001 From: ebbit1q Date: Fri, 10 Oct 2025 02:08:57 +0200 Subject: [PATCH] remove useless semicolons removes the semicolons after empty function definitions these semicolons are optional, they don't do anything this will have functions be consistently formatted if we want to keep the option to have these on the same line like they were before we should use the option AllowShortFunctionsOnASingleLine: None --- .clang-format | 2 ++ cockatrice/src/filters/filter_card.h | 4 +++- .../tabs/visual_deck_storage/tab_deck_storage_visual.h | 4 +++- .../network/server/remote/server_database_interface.h | 4 +++- oracle/src/oraclewizard.h | 8 ++++++-- oracle/src/pagetemplates.h | 4 +++- servatrice/src/serversocketinterface.h | 4 +++- servatrice/src/signalhandler.h | 4 +++- 8 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.clang-format b/.clang-format index 8b142d657..1ef3ca6db 100644 --- a/.clang-format +++ b/.clang-format @@ -26,6 +26,8 @@ PointerAlignment: Right SortIncludes: true IncludeBlocks: Regroup StatementAttributeLikeMacros: [emit] +# requires clang-format 16 +# RemoveSemicolon: true --- Language: Proto AllowShortFunctionsOnASingleLine: None diff --git a/cockatrice/src/filters/filter_card.h b/cockatrice/src/filters/filter_card.h index 62ce1b017..58dbf954b 100644 --- a/cockatrice/src/filters/filter_card.h +++ b/cockatrice/src/filters/filter_card.h @@ -52,7 +52,9 @@ private: enum Attr a; public: - CardFilter(QString &term, Type type, Attr attr) : trm(term), t(type), a(attr) {}; + CardFilter(QString &term, Type type, Attr attr) : trm(term), t(type), a(attr) + { + } Type type() const { diff --git a/cockatrice/src/interface/widgets/tabs/visual_deck_storage/tab_deck_storage_visual.h b/cockatrice/src/interface/widgets/tabs/visual_deck_storage/tab_deck_storage_visual.h index d2fe86dab..b3a4598c0 100644 --- a/cockatrice/src/interface/widgets/tabs/visual_deck_storage/tab_deck_storage_visual.h +++ b/cockatrice/src/interface/widgets/tabs/visual_deck_storage/tab_deck_storage_visual.h @@ -27,7 +27,9 @@ class TabDeckStorageVisual final : public Tab Q_OBJECT public: explicit TabDeckStorageVisual(TabSupervisor *_tabSupervisor); - void retranslateUi() override {}; + void retranslateUi() override + { + } [[nodiscard]] QString getTabText() const override { return tr("Visual Deck Storage"); diff --git a/libcockatrice_network/libcockatrice/network/server/remote/server_database_interface.h b/libcockatrice_network/libcockatrice/network/server/remote/server_database_interface.h index f5123421e..d2577a99b 100644 --- a/libcockatrice_network/libcockatrice/network/server/remote/server_database_interface.h +++ b/libcockatrice_network/libcockatrice/network/server/remote/server_database_interface.h @@ -146,7 +146,9 @@ public: const QString & /* logMessage */, LogMessage_TargetType /* targetType */, const int /* targetId */, - const QString & /* targetName */) {}; + const QString & /* targetName */) + { + } virtual bool checkUserIsBanned(Server_ProtocolHandler * /* session */, QString & /* banReason */, int & /* banSecondsRemaining */) diff --git a/oracle/src/oraclewizard.h b/oracle/src/oraclewizard.h index 8456e0fa5..fe0bf1a21 100644 --- a/oracle/src/oraclewizard.h +++ b/oracle/src/oraclewizard.h @@ -182,7 +182,9 @@ class LoadSpoilersPage : public SimpleDownloadFilePage { Q_OBJECT public: - explicit LoadSpoilersPage(QWidget * = nullptr) {}; + explicit LoadSpoilersPage(QWidget * = nullptr) + { + } void retranslateUi() override; protected: @@ -197,7 +199,9 @@ class LoadTokensPage : public SimpleDownloadFilePage { Q_OBJECT public: - explicit LoadTokensPage(QWidget * = nullptr) {}; + explicit LoadTokensPage(QWidget * = nullptr) + { + } void retranslateUi() override; protected: diff --git a/oracle/src/pagetemplates.h b/oracle/src/pagetemplates.h index 0c11c25bd..372aa2fef 100644 --- a/oracle/src/pagetemplates.h +++ b/oracle/src/pagetemplates.h @@ -13,7 +13,9 @@ class OracleWizardPage : public QWizardPage { Q_OBJECT public: - explicit OracleWizardPage(QWidget *parent = nullptr) : QWizardPage(parent) {}; + explicit OracleWizardPage(QWidget *parent = nullptr) : QWizardPage(parent) + { + } virtual void retranslateUi() = 0; signals: diff --git a/servatrice/src/serversocketinterface.h b/servatrice/src/serversocketinterface.h index f24296c59..e522ea6c1 100644 --- a/servatrice/src/serversocketinterface.h +++ b/servatrice/src/serversocketinterface.h @@ -146,7 +146,9 @@ public: AbstractServerSocketInterface(Servatrice *_server, Servatrice_DatabaseInterface *_databaseInterface, QObject *parent = 0); - ~AbstractServerSocketInterface() {}; + ~AbstractServerSocketInterface() + { + } bool initSession(); virtual QHostAddress getPeerAddress() const = 0; diff --git a/servatrice/src/signalhandler.h b/servatrice/src/signalhandler.h index fe04bad08..bf8d9e52a 100644 --- a/servatrice/src/signalhandler.h +++ b/servatrice/src/signalhandler.h @@ -10,7 +10,9 @@ class SignalHandler : public QObject Q_OBJECT public: SignalHandler(QObject *parent = 0); - ~SignalHandler() {}; + ~SignalHandler() + { + } static void sigHupHandler(int /* sig */); static void sigSegvHandler(int sig);