fix relying on implicit const conversion of JSONValue

- "key" in JSONValue returns const(JSONValue)*
- fromValue expected non-const JSONValue
- implicit conversion of const(JSONValue) to JSONValue to be fixed
  with https://github.com/dlang/phobos/pull/6716
This commit is contained in:
Martin Nowak 2018-11-01 12:59:44 +01:00
parent 419387d197
commit 277e998167

View file

@ -298,7 +298,7 @@ private void init()
readOption("h|help", &g_help, "Prints this help screen."); readOption("h|help", &g_help, "Prints this help screen.");
} }
private T fromValue(T)(JSONValue val) private T fromValue(T)(in JSONValue val)
{ {
import std.conv : to; import std.conv : to;
static if (is(T == bool)) return val.type == JSON_TYPE.TRUE; static if (is(T == bool)) return val.type == JSON_TYPE.TRUE;