Commit 9980968b authored by Mathieu Giraud's avatar Mathieu Giraud

tools.{h,cpp}: output warn levels through add_warning()

See #3136.
parent 5743bfbb
......@@ -414,10 +414,10 @@ void output_label_average(ostream &out, string label, long long int nb, double a
}
void json_add_warning(json &clone, string code, string msg)
void json_add_warning(json &clone, string code, string msg, string level)
{
if (!clone.count("warn"))
clone["warn"] = {} ;
clone["warn"] += { {"code", code}, {"msg", msg} } ;
clone["warn"] += { {"code", code}, {"level", level}, {"msg", msg} } ;
}
......@@ -261,7 +261,7 @@ bool operator!=(const Sequence &s1, const Sequence &s2);
void output_label_average(ostream &out, string label, long long int nb, double average, int precision=1);
void json_add_warning(json &clone, string code, string msg);
void json_add_warning(json &clone, string code, string msg, string level=LEVEL_WARN);
//////////////////////////////////////////////////
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment