Post-Implementation refactoring of application #9

Merged
jotoho merged 17 commits from refactoring into master 2021-09-19 20:40:50 +02:00
Showing only changes of commit 4ab78f4028 - Show all commits

View file

@ -23,9 +23,8 @@ fun main(args: Array<String>) {
options.add(arg.substring(startIndex=2)) options.add(arg.substring(startIndex=2))
} }
else if (arg.startsWith('-')) { else if (arg.startsWith('-')) {
val translation = optionDictionary[arg] if (optionDictionary.containsKey(arg))
if (translation != null) options.add(optionDictionary[arg]!!.substring(startIndex=2))
options.add(translation.substring(startIndex=2))
else else
System.err.println("Short-hand '$arg' does not exist. Ignoring!") System.err.println("Short-hand '$arg' does not exist. Ignoring!")
} }