Merge pull request #100 from MartinNowak/fix_const_json

fix relying on implicit const conversion of JSONValue
This commit is contained in:
Sönke Ludwig 2018-11-02 15:11:10 +01:00 committed by GitHub
commit 928240ccb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -298,7 +298,7 @@ private void init()
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;
static if (is(T == bool)) return val.type == JSON_TYPE.TRUE;