Fix typo. Remove unnecessary proc

This commit is contained in:
Jeff Ciesielski
2016-07-05 07:58:26 -04:00
parent 4f4aafda6c
commit 16f2808439
2 changed files with 2 additions and 9 deletions

View File

@@ -122,13 +122,6 @@ proc splitSwitch(switch: string, cmd, arg: var string, pass: TCmdLinePass,
elif switch[i] in {':', '=', '['}: arg = substr(switch, i + 1)
else: invalidCmdLineOption(pass, switch, info)
proc hasKeyValuePair(arg: string): bool =
for i in 0..arg.high:
if arg[i] in {':', '='}:
return true
return false
proc processOnOffSwitch(op: TOptions, arg: string, pass: TCmdLinePass,
info: TLineInfo) =
case whichKeyword(arg)
@@ -349,7 +342,7 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) =
discard "allow for backwards compatibility, but don't do anything"
of "define", "d":
expectArg(switch, arg, pass, info)
if hasKeyValuePair(arg):
if {':', '='} in arg:
splitSwitch(arg, key, val, pass, info)
defineSymbol(key, val)
else:

View File

@@ -902,7 +902,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: int,
of wIntDefine:
sym.magic = mIntDefine
of wStrDefine:
sym.magic = mIntDefine
sym.magic = mStrDefine
else: invalidPragma(it)
else: invalidPragma(it)