Make Severity::none to match and output empty string.
This commit is contained in:
parent
5f8af2e1e8
commit
f54f28530b
|
@ -38,6 +38,8 @@ public:
|
||||||
{
|
{
|
||||||
switch (severity)
|
switch (severity)
|
||||||
{
|
{
|
||||||
|
case none:
|
||||||
|
return "";
|
||||||
case error:
|
case error:
|
||||||
return "error";
|
return "error";
|
||||||
case style:
|
case style:
|
||||||
|
@ -47,6 +49,10 @@ public:
|
||||||
}
|
}
|
||||||
static SeverityType fromString(const std::string &severity)
|
static SeverityType fromString(const std::string &severity)
|
||||||
{
|
{
|
||||||
|
if (severity.empty())
|
||||||
|
return none;
|
||||||
|
if (severity == "none")
|
||||||
|
return none;
|
||||||
if (severity == "error")
|
if (severity == "error")
|
||||||
return error;
|
return error;
|
||||||
if (severity == "style")
|
if (severity == "style")
|
||||||
|
|
Loading…
Reference in New Issue