Index: xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp |
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp |
index fcd668af6db64709d2f89b50bbfce5870ad56754..4b4b24603855630aeef9920982e8b5b40afe851d 100644 |
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp |
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp |
@@ -58,7 +58,8 @@ const wchar_t CBC_HighLevelEncoder::MACRO_TRAILER = 0x0004; |
CBC_HighLevelEncoder::CBC_HighLevelEncoder() {} |
CBC_HighLevelEncoder::~CBC_HighLevelEncoder() {} |
-CFX_ByteArray& CBC_HighLevelEncoder::getBytesForMessage(CFX_WideString msg) { |
+CFX_ArrayTemplate<uint8_t>& CBC_HighLevelEncoder::getBytesForMessage( |
+ CFX_WideString msg) { |
CFX_ByteString bytestr; |
CBC_UtilCodingConvert::UnicodeToUTF8(msg, bytestr); |
for (int32_t i = 0; i < bytestr.GetLength(); i++) { |
@@ -159,9 +160,9 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg, |
while (true) { |
if ((startpos + charsProcessed) == msg.GetLength()) { |
int32_t min = std::numeric_limits<int32_t>::max(); |
- CFX_ByteArray mins; |
+ CFX_ArrayTemplate<uint8_t> mins; |
mins.SetSize(6); |
- CFX_Int32Array intCharCounts; |
+ CFX_ArrayTemplate<int32_t> intCharCounts; |
intCharCounts.SetSize(6); |
min = findMinimums(charCounts, intCharCounts, min, mins); |
int32_t minCount = getMinimumCount(mins); |
@@ -229,9 +230,9 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg, |
charCounts[BASE256_ENCODATION]++; |
} |
if (charsProcessed >= 4) { |
- CFX_Int32Array intCharCounts; |
+ CFX_ArrayTemplate<int32_t> intCharCounts; |
intCharCounts.SetSize(6); |
- CFX_ByteArray mins; |
+ CFX_ArrayTemplate<uint8_t> mins; |
mins.SetSize(6); |
findMinimums(charCounts, intCharCounts, |
std::numeric_limits<int32_t>::max(), mins); |
@@ -317,10 +318,11 @@ FX_WCHAR CBC_HighLevelEncoder::randomize253State(FX_WCHAR ch, |
return tempVariable <= 254 ? (FX_WCHAR)tempVariable |
: (FX_WCHAR)(tempVariable - 254); |
} |
-int32_t CBC_HighLevelEncoder::findMinimums(std::vector<FX_FLOAT>& charCounts, |
- CFX_Int32Array& intCharCounts, |
- int32_t min, |
- CFX_ByteArray& mins) { |
+int32_t CBC_HighLevelEncoder::findMinimums( |
+ std::vector<FX_FLOAT>& charCounts, |
+ CFX_ArrayTemplate<int32_t>& intCharCounts, |
+ int32_t min, |
+ CFX_ArrayTemplate<uint8_t>& mins) { |
for (int32_t l = 0; l < mins.GetSize(); l++) { |
mins[l] = (uint8_t)0; |
} |
@@ -339,7 +341,8 @@ int32_t CBC_HighLevelEncoder::findMinimums(std::vector<FX_FLOAT>& charCounts, |
} |
return min; |
} |
-int32_t CBC_HighLevelEncoder::getMinimumCount(CFX_ByteArray& mins) { |
+int32_t CBC_HighLevelEncoder::getMinimumCount( |
+ CFX_ArrayTemplate<uint8_t>& mins) { |
int32_t minCount = 0; |
for (int32_t i = 0; i < 6; i++) { |
minCount += mins[i]; |