aboutsummaryrefslogtreecommitdiff
path: root/src/PercentEncodedCharacterDecoder.cpp
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2018-07-01 23:46:14 -0700
committerRichard Walters <rwalters@digitalstirling.com>2018-07-01 23:46:14 -0700
commita8e777c8176e351906adff8d68894bd9e118c306 (patch)
treeda49f1b8fa59596d5692f7f1907270c1af87b98b /src/PercentEncodedCharacterDecoder.cpp
parentff1f4f43d37d0f3c3b599e6a714239962e1cc2f7 (diff)
Refactoring
* Remove IsCharacterInSet function
Diffstat (limited to 'src/PercentEncodedCharacterDecoder.cpp')
-rw-r--r--src/PercentEncodedCharacterDecoder.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/PercentEncodedCharacterDecoder.cpp b/src/PercentEncodedCharacterDecoder.cpp
index 1720ee9..3dd302f 100644
--- a/src/PercentEncodedCharacterDecoder.cpp
+++ b/src/PercentEncodedCharacterDecoder.cpp
@@ -62,11 +62,11 @@ namespace Uri {
case 0: { // % ...
impl_->decoderState = 1;
impl_->decodedCharacter <<= 4;
- if (IsCharacterInSet(c, DIGIT)) {
+ if (DIGIT.Contains(c)) {
impl_->decodedCharacter += (int)(c - '0');
- } else if (IsCharacterInSet(c, HEX_UPPER)) {
+ } else if (HEX_UPPER.Contains(c)) {
impl_->decodedCharacter += (int)(c - 'A') + 10;
- } else if (IsCharacterInSet(c, HEX_LOWER)) {
+ } else if (HEX_LOWER.Contains(c)) {
impl_->decodedCharacter += (int)(c - 'a') + 10;
} else {
return false;
@@ -76,11 +76,11 @@ namespace Uri {
case 1: { // %[0-9A-F] ...
impl_->decoderState = 2;
impl_->decodedCharacter <<= 4;
- if (IsCharacterInSet(c, DIGIT)) {
+ if (DIGIT.Contains(c)) {
impl_->decodedCharacter += (int)(c - '0');
- } else if (IsCharacterInSet(c, HEX_UPPER)) {
+ } else if (HEX_UPPER.Contains(c)) {
impl_->decodedCharacter += (int)(c - 'A') + 10;
- } else if (IsCharacterInSet(c, HEX_LOWER)) {
+ } else if (HEX_LOWER.Contains(c)) {
impl_->decodedCharacter += (int)(c - 'a') + 10;
} else {
return false;