summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/datamatrix
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode/datamatrix')
-rw-r--r--xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp28
-rw-r--r--xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h4
2 files changed, 17 insertions, 15 deletions
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index 7d81c93418..fcd668af6d 100644
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
@@ -138,21 +138,21 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
if (startpos >= msg.GetLength()) {
return currentMode;
}
- CFX_FloatArray charCounts;
+ std::vector<FX_FLOAT> charCounts;
if (currentMode == ASCII_ENCODATION) {
- charCounts.Add(0);
- charCounts.Add(1);
- charCounts.Add(1);
- charCounts.Add(1);
- charCounts.Add(1);
- charCounts.Add(1.25f);
+ charCounts.push_back(0);
+ charCounts.push_back(1);
+ charCounts.push_back(1);
+ charCounts.push_back(1);
+ charCounts.push_back(1);
+ charCounts.push_back(1.25f);
} else {
- charCounts.Add(1);
- charCounts.Add(2);
- charCounts.Add(2);
- charCounts.Add(2);
- charCounts.Add(2);
- charCounts.Add(2.25f);
+ charCounts.push_back(1);
+ charCounts.push_back(2);
+ charCounts.push_back(2);
+ charCounts.push_back(2);
+ charCounts.push_back(2);
+ charCounts.push_back(2.25f);
charCounts[currentMode] = 0;
}
int32_t charsProcessed = 0;
@@ -317,7 +317,7 @@ FX_WCHAR CBC_HighLevelEncoder::randomize253State(FX_WCHAR ch,
return tempVariable <= 254 ? (FX_WCHAR)tempVariable
: (FX_WCHAR)(tempVariable - 254);
}
-int32_t CBC_HighLevelEncoder::findMinimums(CFX_FloatArray& charCounts,
+int32_t CBC_HighLevelEncoder::findMinimums(std::vector<FX_FLOAT>& charCounts,
CFX_Int32Array& intCharCounts,
int32_t min,
CFX_ByteArray& mins) {
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
index cf04c06619..3b88f888fd 100644
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_
#define XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_
+#include <vector>
+
#include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h"
#define ASCII_ENCODATION 0
@@ -61,7 +63,7 @@ class CBC_HighLevelEncoder : public CBC_SymbolShapeHint {
private:
static FX_WCHAR randomize253State(FX_WCHAR ch, int32_t codewordPosition);
- static int32_t findMinimums(CFX_FloatArray& charCounts,
+ static int32_t findMinimums(std::vector<FX_FLOAT>& charCounts,
CFX_Int32Array& intCharCounts,
int32_t min,
CFX_ByteArray& mins);