Skip to content

Commit

Permalink
remove useless bool
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck committed Mar 3, 2019
1 parent 6d7656c commit 3747a32
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions compiler/commands.nim
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ proc writeVersionInfo(conf: ConfigRef; pass: TCmdLinePass) =
{msgStdout})
msgQuit(0)

proc writeCommandLineUsage*(conf: ConfigRef; helpWritten: var bool) =
if not helpWritten:
msgWriteln(conf, getCommandLineDesc(conf), {msgStdout})
helpWritten = true
proc writeCommandLineUsage*(conf: ConfigRef) =
msgWriteln(conf, getCommandLineDesc(conf), {msgStdout})

proc addPrefix(switch: string): string =
if len(switch) == 1: result = "-" & switch
Expand Down
2 changes: 1 addition & 1 deletion compiler/nim.nim
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
)
self.initDefinesProg(conf, "nim_compiler")
if paramCount() == 0:
writeCommandLineUsage(conf, conf.helpWritten)
writeCommandLineUsage(conf)
return

self.processCmdLineAndProjectPath(conf)
Expand Down
1 change: 0 additions & 1 deletion compiler/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ type
features*: set[Feature]
arguments*: string ## the arguments to be passed to the program that
## should be run
helpWritten*: bool
ideCmd*: IdeCmd
oldNewlines*: bool
cCompiler*: TSystemCC
Expand Down

0 comments on commit 3747a32

Please sign in to comment.