Skip to content

Commit 11abfc8

Browse files
committed
CmdLineParser: drop parameter from printHelp()
1 parent 473c2c4 commit 11abfc8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

cli/cmdlineparser.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
353353
return Result::Fail;
354354

355355
if (argc <= 1) {
356-
printHelp(mSettings.premium);
356+
printHelp();
357357
return Result::Exit;
358358
}
359359

@@ -388,7 +388,7 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
388388

389389
// Print help
390390
if (std::strcmp(argv[i], "-h") == 0 || std::strcmp(argv[i], "--help") == 0) {
391-
printHelp(mSettings.premium);
391+
printHelp();
392392
return Result::Exit;
393393
}
394394

@@ -1700,7 +1700,7 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
17001700
return Result::Success;
17011701
}
17021702

1703-
void CmdLineParser::printHelp(bool premium) const
1703+
void CmdLineParser::printHelp() const
17041704
{
17051705
std::ostringstream oss;
17061706
// TODO: display product name
@@ -1901,7 +1901,7 @@ void CmdLineParser::printHelp(bool premium) const
19011901
" --plist-output=<path>\n"
19021902
" Generate Clang-plist output files in folder.\n";
19031903

1904-
if (premium) {
1904+
if (mSettings.premium) {
19051905
oss <<
19061906
" --premium=<option>\n"
19071907
" Coding standards:\n"

cli/cmdlineparser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class CmdLineParser {
109109
/**
110110
* Print help text to the console.
111111
*/
112-
void printHelp(bool premium) const;
112+
void printHelp() const;
113113

114114
template<typename T>
115115
bool parseNumberArg(const char* const arg, std::size_t offset, T& num, bool mustBePositive = false)

0 commit comments

Comments
 (0)