Commit a28e4bef authored by Milo Yip's avatar Milo Yip

Improve coverage of Regex by removing default case.

parent ba0a137b
...@@ -413,7 +413,8 @@ private: ...@@ -413,7 +413,8 @@ private:
} }
return false; return false;
case kOneOrMore: default:
RAPIDJSON_ASSERT(op == kOneOrMore);
if (operandStack.GetSize() >= sizeof(Frag)) { if (operandStack.GetSize() >= sizeof(Frag)) {
Frag e = *operandStack.template Pop<Frag>(1); Frag e = *operandStack.template Pop<Frag>(1);
SizeType s = NewState(kRegexInvalidState, e.start, 0); SizeType s = NewState(kRegexInvalidState, e.start, 0);
...@@ -422,9 +423,6 @@ private: ...@@ -422,9 +423,6 @@ private:
return true; return true;
} }
return false; return false;
default:
return false;
} }
} }
......
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