Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Yip <miloyip@gmail.com>2016-04-17 04:34:04 +0300
committerMilo Yip <miloyip@gmail.com>2016-04-17 04:34:04 +0300
commita28e4befed0ee03ab64843695c43358a04f0d05e (patch)
tree81e9fe4874360e0ea959de1124375a83de01a83e
parentba0a137b9c99db1af641575ae589d2c757146c31 (diff)
Improve coverage of Regex by removing default case.
-rw-r--r--include/rapidjson/internal/regex.h6
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;
}
}