Fix parser
Fixes #445 (closed).
I am using a new variable in the parameter
structure (is_default
) that I set to 1 if we write in params a default value.
Currently I am only checking on the get_opt_params
function. I am wondering if we should ensure that we are not reading a mandatory parameter from a default value.
For example:
parser_get_opt_param_double(params, "Test:test", 1.); // Test:test does not exist in params
parser_get_param_double(params, "Test:test"); // Here currently we read the previous default value without any warning
Edited by Matthieu Schaller