From 5bdb21e268f8b3636376182f510ee8ea9d83f892 Mon Sep 17 00:00:00 2001 From: mrbesen Date: Sat, 2 Sep 2023 12:01:41 +0200 Subject: [PATCH] fix compile warnings --- include/clientapi.h | 8 ++++---- include/position.h | 2 +- lolautoaccept.pro | 2 ++ src/clientapi_json.cpp | 12 ++++++------ 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/clientapi.h b/include/clientapi.h index c67d90c..732ae6e 100644 --- a/include/clientapi.h +++ b/include/clientapi.h @@ -232,9 +232,9 @@ private: std::ostream& operator<<(std::ostream&, const ClientAPI::CLASS&); \ QDebug operator<<(QDebug, const ClientAPI::CLASS&); -DEFINEOPERATOR(ReadyCheckState); -DEFINEOPERATOR(GameflowPhase); -DEFINEOPERATOR(ChampSelectPhase); -DEFINEOPERATOR(ChampSelectActionType); +DEFINEOPERATOR(ReadyCheckState) +DEFINEOPERATOR(GameflowPhase) +DEFINEOPERATOR(ChampSelectPhase) +DEFINEOPERATOR(ChampSelectActionType) #undef DEFINEOPERATOR diff --git a/include/position.h b/include/position.h index 491324e..3669c0a 100644 --- a/include/position.h +++ b/include/position.h @@ -18,4 +18,4 @@ QString toShortString(Position p); std::ostream& operator<<(std::ostream&, const Position&); QDebug operator<<(QDebug , const Position&); -Q_DECLARE_METATYPE(Position); +Q_DECLARE_METATYPE(Position) diff --git a/lolautoaccept.pro b/lolautoaccept.pro index b49e083..d3126e4 100644 --- a/lolautoaccept.pro +++ b/lolautoaccept.pro @@ -28,6 +28,8 @@ DEFINES += LOG_ENABLEQT=1 DEFINES += LOLAA_VERSION=\\\"0.0.7\\\" +QMAKE_CXXFLAGS += -Wall -Wpedantic -Wextra + # parameters: var, prepend, append defineReplace(prependAll) { for(a,$$1):result += $$2$${a}$$3 diff --git a/src/clientapi_json.cpp b/src/clientapi_json.cpp index 2a43419..e999406 100644 --- a/src/clientapi_json.cpp +++ b/src/clientapi_json.cpp @@ -12,12 +12,12 @@ #define ARR(NAME, ...) static const QString NAME ## Names[] = {__VA_ARGS__}; \ static const uint32_t NAME ## NamesCount = ARRSIZE(NAME ## Names); -ARR(ReadyCheckState, "Invalid", "None", "InProgress", "Accepted", "Declined"); -ARR(GameflowPhase, "None", "Lobby", "Matchmaking", "CheckedIntoTournament", "ReadyCheck", "ChampSelect", "GameStart", "FailedToLaunch", "InProgress", "Reconnect", "WaitingForStats", "PreEndOfGame", "EndOfGame", "TerminatedInError"); -ARR(ChampSelectPhase, "Invalid", "GAME_STARTING", "PLANNING", "BAN_PICK", "FINALIZATION"); -ARR(Position, "Invalid", "top", "jungle", "middle", "bottom", "utility"); -ARR(ShortPosition, "", "Top", "Jgl", "Mid", "Bot", "Sup"); -ARR(ChampSelectActionType, "Invalid", "ban", "pick", "ten_bans_reveal"); +ARR(ReadyCheckState, "Invalid", "None", "InProgress", "Accepted", "Declined") +ARR(GameflowPhase, "None", "Lobby", "Matchmaking", "CheckedIntoTournament", "ReadyCheck", "ChampSelect", "GameStart", "FailedToLaunch", "InProgress", "Reconnect", "WaitingForStats", "PreEndOfGame", "EndOfGame", "TerminatedInError") +ARR(ChampSelectPhase, "Invalid", "GAME_STARTING", "PLANNING", "BAN_PICK", "FINALIZATION") +ARR(Position, "Invalid", "top", "jungle", "middle", "bottom", "utility") +ARR(ShortPosition, "", "Top", "Jgl", "Mid", "Bot", "Sup") +ARR(ChampSelectActionType, "Invalid", "ban", "pick", "ten_bans_reveal") template static T mapEnum(const QString& input, const QString* names, uint32_t count, T defaul) {