diff options
author | tsepez <tsepez@chromium.org> | 2016-12-13 12:45:56 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-13 12:45:56 -0800 |
commit | 988599c5d81bbb568f949454580ec6001258f806 (patch) | |
tree | ef17a32995dabec3c63418a2f65fb21a950ade70 /xfa/fxbarcode | |
parent | 05b4fc1227f5b6d39a3a65daf915a92ea3b749f4 (diff) | |
download | pdfium-988599c5d81bbb568f949454580ec6001258f806.tar.xz |
Replace CFX_FloatArray with std::vector
Review-Url: https://codereview.chromium.org/2567503002
Diffstat (limited to 'xfa/fxbarcode')
-rw-r--r-- | xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp | 28 | ||||
-rw-r--r-- | xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h | 4 |
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); |