fix compile warnings

This commit is contained in:
mrbesen 2023-09-02 12:01:41 +02:00
parent b1c4739138
commit 5bdb21e268
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
4 changed files with 13 additions and 11 deletions

View File

@ -232,9 +232,9 @@ private:
std::ostream& operator<<(std::ostream&, const ClientAPI::CLASS&); \ std::ostream& operator<<(std::ostream&, const ClientAPI::CLASS&); \
QDebug operator<<(QDebug, const ClientAPI::CLASS&); QDebug operator<<(QDebug, const ClientAPI::CLASS&);
DEFINEOPERATOR(ReadyCheckState); DEFINEOPERATOR(ReadyCheckState)
DEFINEOPERATOR(GameflowPhase); DEFINEOPERATOR(GameflowPhase)
DEFINEOPERATOR(ChampSelectPhase); DEFINEOPERATOR(ChampSelectPhase)
DEFINEOPERATOR(ChampSelectActionType); DEFINEOPERATOR(ChampSelectActionType)
#undef DEFINEOPERATOR #undef DEFINEOPERATOR

View File

@ -18,4 +18,4 @@ QString toShortString(Position p);
std::ostream& operator<<(std::ostream&, const Position&); std::ostream& operator<<(std::ostream&, const Position&);
QDebug operator<<(QDebug , const Position&); QDebug operator<<(QDebug , const Position&);
Q_DECLARE_METATYPE(Position); Q_DECLARE_METATYPE(Position)

View File

@ -28,6 +28,8 @@ DEFINES += LOG_ENABLEQT=1
DEFINES += LOLAA_VERSION=\\\"0.0.7\\\" DEFINES += LOLAA_VERSION=\\\"0.0.7\\\"
QMAKE_CXXFLAGS += -Wall -Wpedantic -Wextra
# parameters: var, prepend, append # parameters: var, prepend, append
defineReplace(prependAll) { defineReplace(prependAll) {
for(a,$$1):result += $$2$${a}$$3 for(a,$$1):result += $$2$${a}$$3

View File

@ -12,12 +12,12 @@
#define ARR(NAME, ...) static const QString NAME ## Names[] = {__VA_ARGS__}; \ #define ARR(NAME, ...) static const QString NAME ## Names[] = {__VA_ARGS__}; \
static const uint32_t NAME ## NamesCount = ARRSIZE(NAME ## Names); static const uint32_t NAME ## NamesCount = ARRSIZE(NAME ## Names);
ARR(ReadyCheckState, "Invalid", "None", "InProgress", "Accepted", "Declined"); ARR(ReadyCheckState, "Invalid", "None", "InProgress", "Accepted", "Declined")
ARR(GameflowPhase, "None", "Lobby", "Matchmaking", "CheckedIntoTournament", "ReadyCheck", "ChampSelect", "GameStart", "FailedToLaunch", "InProgress", "Reconnect", "WaitingForStats", "PreEndOfGame", "EndOfGame", "TerminatedInError"); 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(ChampSelectPhase, "Invalid", "GAME_STARTING", "PLANNING", "BAN_PICK", "FINALIZATION")
ARR(Position, "Invalid", "top", "jungle", "middle", "bottom", "utility"); ARR(Position, "Invalid", "top", "jungle", "middle", "bottom", "utility")
ARR(ShortPosition, "", "Top", "Jgl", "Mid", "Bot", "Sup"); ARR(ShortPosition, "", "Top", "Jgl", "Mid", "Bot", "Sup")
ARR(ChampSelectActionType, "Invalid", "ban", "pick", "ten_bans_reveal"); ARR(ChampSelectActionType, "Invalid", "ban", "pick", "ten_bans_reveal")
template<typename T> template<typename T>
static T mapEnum(const QString& input, const QString* names, uint32_t count, T defaul) { static T mapEnum(const QString& input, const QString* names, uint32_t count, T defaul) {