Use DataVector<T> in fxbarcode/.
Easier to write than std::vector<T, FxAllocAllocator<T>>.
Change-Id: Ia3b0c4d0fa54552b3415a5314154822277e0d051
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96410
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fxbarcode/qrcode/BC_QRCodeWriter.cpp b/fxbarcode/qrcode/BC_QRCodeWriter.cpp
index 646e7e0..77fe042 100644
--- a/fxbarcode/qrcode/BC_QRCodeWriter.cpp
+++ b/fxbarcode/qrcode/BC_QRCodeWriter.cpp
@@ -22,6 +22,9 @@
#include "fxbarcode/qrcode/BC_QRCodeWriter.h"
+#include <stdint.h>
+
+#include "core/fxcrt/data_vector.h"
#include "core/fxcrt/stl_util.h"
#include "fxbarcode/common/BC_CommonByteMatrix.h"
#include "fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h"
@@ -43,12 +46,11 @@
return true;
}
-std::vector<uint8_t, FxAllocAllocator<uint8_t>> CBC_QRCodeWriter::Encode(
- WideStringView contents,
- int32_t ecLevel,
- int32_t* pOutWidth,
- int32_t* pOutHeight) {
- std::vector<uint8_t, FxAllocAllocator<uint8_t>> results;
+DataVector<uint8_t> CBC_QRCodeWriter::Encode(WideStringView contents,
+ int32_t ecLevel,
+ int32_t* pOutWidth,
+ int32_t* pOutHeight) {
+ DataVector<uint8_t> results;
CBC_QRCoderErrorCorrectionLevel* ec = nullptr;
switch (ecLevel) {
case 0: