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&); \
QDebug operator<<(QDebug, const ClientAPI::CLASS&);
DEFINEOPERATOR(ReadyCheckState);
DEFINEOPERATOR(GameflowPhase);
DEFINEOPERATOR(ChampSelectPhase);
DEFINEOPERATOR(ChampSelectActionType);
DEFINEOPERATOR(ReadyCheckState)
DEFINEOPERATOR(GameflowPhase)
DEFINEOPERATOR(ChampSelectPhase)
DEFINEOPERATOR(ChampSelectActionType)
#undef DEFINEOPERATOR

View File

@ -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)

View File

@ -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

View File

@ -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<typename T>
static T mapEnum(const QString& input, const QString* names, uint32_t count, T defaul) {