diff options
author | bptato <nincsnevem662@gmail.com> | 2021-10-03 13:14:07 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2021-10-03 13:14:07 +0200 |
commit | 872db4726aaf53f307139dd42e79809ce9796c0e (patch) | |
tree | d1c996e976b015c0da5b80cb56eb232d5cb085cf /src/config | |
parent | 71f08f380b233ad415ab6954924c395a85ffc577 (diff) | |
download | chawan-872db4726aaf53f307139dd42e79809ce9796c0e.tar.gz |
Remove compose
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/config.nim | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/config/config.nim b/src/config/config.nim index dab5347f..d055af53 100644 --- a/src/config/config.nim +++ b/src/config/config.nim @@ -37,15 +37,13 @@ type StaticConfig = object nmap: ActionMap lemap: ActionMap - cmap: Table[string, string] Config = object nmap*: ActionMap lemap*: ActionMap - cmap*: RadixNode[string] func getConfig(s: StaticConfig): Config = - return Config(nmap: s.nmap, lemap: s.lemap, cmap: s.cmap.toRadixTree()) + return Config(nmap: s.nmap, lemap: s.lemap) func getRealKey(key: string): string = var realk: string @@ -116,8 +114,6 @@ proc parseConfigLine[T](line: string, config: var T) = config.nmap[getRealKey(cmd[1])] = parseEnum[TwtAction]("ACTION_" & cmd[2]) elif cmd[0] == "lemap": config.lemap[getRealKey(cmd[1])] = parseEnum[TwtAction]("ACTION_" & cmd[2]) - elif cmd[0] == "comp": - config.cmap[getRealKey(cmd[1])] = cmd[2] proc staticReadConfig(): StaticConfig = let default = staticRead"res/config" @@ -135,7 +131,6 @@ proc readConfig(filename: string) = let status = f.open(filename, fmRead) var nmap: ActionMap var lemap: ActionMap - var compose: Table[string, string] if status: var line: TaintedString while f.readLine(line): @@ -143,7 +138,6 @@ proc readConfig(filename: string) = gconfig.nmap = constructActionTable(nmap) gconfig.lemap = constructActionTable(lemap) - gconfig.cmap = compose.toRadixTree() proc readConfig*() = when defined(debug): |