diff options
author | Lei Zhang <thestig@chromium.org> | 2017-04-03 16:40:51 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-04 19:04:37 +0000 |
commit | 03d58937248fa244cbf02a3d38d430a513500311 (patch) | |
tree | 9ea96b01b0f2f2464bd9d5c49e76dd8e0466a8b0 /fxbarcode/qrcode/BC_QRCoderBlockPair.cpp | |
parent | c3202a95773d7a2c95038ad45c5ba2c9e095e67b (diff) | |
download | pdfium-03d58937248fa244cbf02a3d38d430a513500311.tar.xz |
Clean up QRCoderEncoder and friends.
Remove a bunch of unused code, including gotos.
Fix some potential memory leaks.
Change-Id: Ia2775e2ab176f4741b765e259a24a293a5717394
Reviewed-on: https://pdfium-review.googlesource.com/3560
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxbarcode/qrcode/BC_QRCoderBlockPair.cpp')
-rw-r--r-- | fxbarcode/qrcode/BC_QRCoderBlockPair.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp b/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp index 9d2a1f8375..9ac93e9b14 100644 --- a/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp +++ b/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp @@ -26,11 +26,7 @@ #include "fxbarcode/common/BC_CommonByteArray.h" -CBC_QRCoderBlockPair::CBC_QRCoderBlockPair( - std::unique_ptr<CBC_CommonByteArray> data, - std::unique_ptr<CBC_CommonByteArray> errorCorrection) - : m_dataBytes(std::move(data)), - m_errorCorrectionBytes(std::move(errorCorrection)) {} +CBC_QRCoderBlockPair::CBC_QRCoderBlockPair() {} CBC_QRCoderBlockPair::~CBC_QRCoderBlockPair() {} @@ -42,3 +38,10 @@ const CBC_CommonByteArray* CBC_QRCoderBlockPair::GetErrorCorrectionBytes() const { return m_errorCorrectionBytes.get(); } + +void CBC_QRCoderBlockPair::SetData( + std::unique_ptr<CBC_CommonByteArray> data, + std::unique_ptr<CBC_CommonByteArray> errorCorrection) { + m_dataBytes = std::move(data); + m_errorCorrectionBytes = std::move(errorCorrection); +} |