Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Unified Diff: xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp

Issue 2567503002: Replace CFX_FloatArray with std::vector (Closed)
Patch Set: One less pointer Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h ('k') | xfa/fxfa/app/xfa_ffwidgetacc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index 7d81c9341833969174fb8451ae39147a5e2fd8de..fcd668af6db64709d2f89b50bbfce5870ad56754 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) {
« no previous file with comments | « xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h ('k') | xfa/fxfa/app/xfa_ffwidgetacc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698