Skip to content

Commit

Permalink
Don't wrap checks with important side-effects in Q_ASSERT()
Browse files Browse the repository at this point in the history
Was causing the command line parsing to fail in release configs.
  • Loading branch information
oblivioncth committed Jul 10, 2024
1 parent cfccc27 commit 086051b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/fp-items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,12 @@ GameDataParameters::GameDataParameters(const QString& rawParameters)

QCommandLineParser parser;
parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
Q_ASSERT(parser.addOptions({
bool optAdd = parser.addOptions({
OPT_EXTRACT,
OPT_EXTRACTED,
OPT_SERVER
}));
});
Q_ASSERT(optAdd);

// Determine params
QStringList param{u"GDP"_s}; // Need to add dummy "executable name" for QCommandLineParser, it's ignored
Expand Down

0 comments on commit 086051b

Please sign in to comment.