diff options
author | Milo Yip <miloyip@gmail.com> | 2016-04-17 04:34:04 +0300 |
---|---|---|
committer | Milo Yip <miloyip@gmail.com> | 2016-04-17 04:34:04 +0300 |
commit | a28e4befed0ee03ab64843695c43358a04f0d05e (patch) | |
tree | 81e9fe4874360e0ea959de1124375a83de01a83e | |
parent | ba0a137b9c99db1af641575ae589d2c757146c31 (diff) |
Improve coverage of Regex by removing default case.
-rw-r--r-- | include/rapidjson/internal/regex.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/rapidjson/internal/regex.h b/include/rapidjson/internal/regex.h index c2062942..c0a3ec57 100644 --- a/include/rapidjson/internal/regex.h +++ b/include/rapidjson/internal/regex.h @@ -413,7 +413,8 @@ private: } return false; - case kOneOrMore: + default: + RAPIDJSON_ASSERT(op == kOneOrMore); if (operandStack.GetSize() >= sizeof(Frag)) { Frag e = *operandStack.template Pop<Frag>(1); SizeType s = NewState(kRegexInvalidState, e.start, 0); @@ -422,9 +423,6 @@ private: return true; } return false; - - default: - return false; } } |