summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/qrcode
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-20 12:59:50 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-20 12:59:50 -0800
commit82aa396188ec26f22fe730f4e35b5a54ebffb5dc (patch)
tree3950a96204c68fed27d1812cdd9d30de1a6226c0 /xfa/fxbarcode/qrcode
parent6db6fbcdee9f1887ac02c647210bd5013358f12d (diff)
downloadpdfium-82aa396188ec26f22fe730f4e35b5a54ebffb5dc.tar.xz
Replace CFX_ByteArray with CFX_ArrayTemplate<uint8_t>chromium/2990chromium/2989chromium/2988
Also replace CFX_Int32Array typedef with CFX_ArrayTemplate<int32_t>. Removing the typedefs makes subsequent conversion to std::vector<> easier on a case-by-case basis. Review-Url: https://codereview.chromium.org/2649563003
Diffstat (limited to 'xfa/fxbarcode/qrcode')
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp8
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h2
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderVersion.cpp2
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderVersion.h4
4 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index 332f1de9c2..ab17d244fa 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
@@ -95,7 +95,7 @@ void CBC_QRCoderEncoder::AppendDataModeLenghInfo(
e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
} else if (tempMode == CBC_QRCoderMode::sBYTE) {
- CFX_ByteArray bytes;
+ CFX_ArrayTemplate<uint8_t> bytes;
CBC_UtilCodingConvert::LocaleToUtf8(splitResult.second, bytes);
AppendModeInfo(tempMode, &headerAndDataBits, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
@@ -722,7 +722,7 @@ void CBC_QRCoderEncoder::Append8BitBytes(const CFX_ByteString& content,
}
}
-void CBC_QRCoderEncoder::Append8BitBytes(CFX_ByteArray& bytes,
+void CBC_QRCoderEncoder::Append8BitBytes(CFX_ArrayTemplate<uint8_t>& bytes,
CBC_QRCoderBitVector* bits,
int32_t& e) {
for (int32_t i = 0; i < bytes.GetSize(); i++) {
@@ -734,7 +734,7 @@ void CBC_QRCoderEncoder::Append8BitBytes(CFX_ByteArray& bytes,
void CBC_QRCoderEncoder::AppendKanjiBytes(const CFX_ByteString& content,
CBC_QRCoderBitVector* bits,
int32_t& e) {
- CFX_ByteArray bytes;
+ CFX_ArrayTemplate<uint8_t> bytes;
uint32_t value = 0;
for (int32_t i = 0; i < bytes.GetSize(); i += 2) {
value = (uint32_t)((uint8_t)(content[i] << 8) | (uint8_t)content[i + 1]);
@@ -907,7 +907,7 @@ CBC_CommonByteArray* CBC_QRCoderEncoder::GenerateECBytes(
int32_t numEcBytesInBlock,
int32_t& e) {
int32_t numDataBytes = dataBytes->Size();
- CFX_Int32Array toEncode;
+ CFX_ArrayTemplate<int32_t> toEncode;
toEncode.SetSize(numDataBytes + numEcBytesInBlock);
for (int32_t i = 0; i < numDataBytes; i++) {
toEncode[i] = (dataBytes->At(i));
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h
index 649938a060..a1b078f24c 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h
@@ -62,7 +62,7 @@ class CBC_QRCoderEncoder {
CBC_QRCoderBitVector* bits,
CFX_ByteString encoding,
int32_t& e);
- static void Append8BitBytes(CFX_ByteArray& bytes,
+ static void Append8BitBytes(CFX_ArrayTemplate<uint8_t>& bytes,
CBC_QRCoderBitVector* bits,
int32_t& e);
static void AppendKanjiBytes(const CFX_ByteString& content,
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderVersion.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderVersion.cpp
index b0b445bede..b4effb91a5 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderVersion.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderVersion.cpp
@@ -354,7 +354,7 @@ CBC_QRCoderVersion::~CBC_QRCoderVersion() {
int32_t CBC_QRCoderVersion::GetVersionNumber() {
return m_versionNumber;
}
-CFX_Int32Array* CBC_QRCoderVersion::GetAlignmentPatternCenters() {
+CFX_ArrayTemplate<int32_t>* CBC_QRCoderVersion::GetAlignmentPatternCenters() {
return &m_alignmentPatternCenters;
}
int32_t CBC_QRCoderVersion::GetTotalCodeWords() {
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h b/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h
index 43b4b6062e..030dd512a0 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderVersion.h
@@ -23,7 +23,7 @@ class CBC_QRCoderVersion {
int32_t GetTotalCodeWords();
int32_t GetDimensionForVersion();
CBC_CommonBitMatrix* BuildFunctionPattern(int32_t& e);
- CFX_Int32Array* GetAlignmentPatternCenters();
+ CFX_ArrayTemplate<int32_t>* GetAlignmentPatternCenters();
CBC_QRCoderECBlocks* GetECBlocksForLevel(
CBC_QRCoderErrorCorrectionLevel* ecLevel);
static CBC_QRCoderVersion* GetVersionForNumber(int32_t versionNumber,
@@ -48,7 +48,7 @@ class CBC_QRCoderVersion {
int32_t m_versionNumber;
int32_t m_totalCodeWords;
- CFX_Int32Array m_alignmentPatternCenters;
+ CFX_ArrayTemplate<int32_t> m_alignmentPatternCenters;
CFX_ArrayTemplate<CBC_QRCoderECBlocks*> m_ecBlocksArray;
};