summaryrefslogtreecommitdiff
path: root/hex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hex.cpp')
-rw-r--r--hex.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/hex.cpp b/hex.cpp
index 5ac6e8cf..31561676 100644
--- a/hex.cpp
+++ b/hex.cpp
@@ -13,13 +13,20 @@ static const byte s_vecLower[] = "0123456789abcdef";
void HexEncoder::IsolatedInitialize(const NameValuePairs &parameters)
{
- bool uppercase = parameters.GetValueWithDefault("Uppercase", true);
+ bool uppercase = parameters.GetValueWithDefault(Name::Uppercase(), true);
m_filter->Initialize(CombinedNameValuePairs(
parameters,
- MakeParameters("EncodingLookupArray", uppercase ? &s_vecUpper[0] : &s_vecLower[0])("Log2Base", 4)));
+ MakeParameters(Name::EncodingLookupArray(), uppercase ? &s_vecUpper[0] : &s_vecLower[0], false)(Name::Log2Base(), 4, true)));
}
-const int *HexDecoder::GetDecodingLookupArray()
+void HexDecoder::IsolatedInitialize(const NameValuePairs &parameters)
+{
+ BaseN_Decoder::Initialize(CombinedNameValuePairs(
+ parameters,
+ MakeParameters(Name::DecodingLookupArray(), GetDefaultDecodingLookupArray(), false)(Name::Log2Base(), 4, true)));
+}
+
+const int *HexDecoder::GetDefaultDecodingLookupArray()
{
static bool s_initialized = false;
static int s_array[256];