summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-04 06:34:19 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-04 06:34:20 -0800
commitfff400a5df032c2203eef9f76a5dbb164672df3d (patch)
treee244ff7a869c267c40d28a6f1f5ea73ee63c3d86 /xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h
parent4741b291f462c0c4a5de4abf1653c3b3c87b613a (diff)
downloadpdfium-fff400a5df032c2203eef9f76a5dbb164672df3d.tar.xz
Remove CFX_ArrayTemplate in BC_QRCoderEncoder.
Also, class Make_Pair is confusing given std::make_pair(). No need for vectors of pointers when there are reasonable copy ctors. Save 288 bytes in a table while we're at it, and make local to file. Fix spelling of "Numberic". Review-Url: https://codereview.chromium.org/2595203002
Diffstat (limited to 'xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h')
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h
index 6303d7c1c5..649938a060 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.h
@@ -7,6 +7,9 @@
#ifndef XFA_FXBARCODE_QRCODE_BC_QRCODERENCODER_H_
#define XFA_FXBARCODE_QRCODE_BC_QRCODERENCODER_H_
+#include <utility>
+#include <vector>
+
#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/fx_string.h"
@@ -16,12 +19,8 @@ class CBC_QRCoderMode;
class CBC_QRCoderBitVector;
class CBC_CommonByteArray;
class CBC_CommonByteMatrix;
-class Make_Pair;
class CBC_QRCoderEncoder {
- private:
- static const int32_t m_alphaNumbericTable[96];
-
public:
CBC_QRCoderEncoder();
virtual ~CBC_QRCoderEncoder();
@@ -121,13 +120,16 @@ class CBC_QRCoderEncoder {
CBC_QRCoderMode* modeSecond,
int32_t versionNum,
int32_t& e);
- static void MergeString(CFX_ArrayTemplate<Make_Pair*>* result,
- int32_t versionNum,
- int32_t& e);
- static void SplitString(const CFX_ByteString& content,
- CFX_ArrayTemplate<Make_Pair*>* result);
+ static void MergeString(
+ std::vector<std::pair<CBC_QRCoderMode*, CFX_ByteString>>* result,
+ int32_t versionNum,
+ int32_t& e);
+ static void SplitString(
+ const CFX_ByteString& content,
+ std::vector<std::pair<CBC_QRCoderMode*, CFX_ByteString>>* result);
static void AppendDataModeLenghInfo(
- const CFX_ArrayTemplate<Make_Pair*>& splitResult,
+ const std::vector<std::pair<CBC_QRCoderMode*, CFX_ByteString>>&
+ splitResult,
CBC_QRCoderBitVector& headerAndDataBits,
CBC_QRCoderMode* tempMode,
CBC_QRCoder* qrCode,