diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-07-03 15:57:03 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-03 15:57:03 +0000 |
commit | 1c14ae2fbe1ae95dac3a7f5e60d049d9630aef02 (patch) | |
tree | 2d121ae2a0436adce5c54379d1824b427dd03359 /fxbarcode/qrcode/BC_QRCodeWriter.cpp | |
parent | d77e0ed72f73fb63305d04953ef03e2edab82d34 (diff) | |
download | pdfium-1c14ae2fbe1ae95dac3a7f5e60d049d9630aef02.tar.xz |
Avoid explicit allocs in fxbarcode matrix classes.
Other cleanups:
Remove unused method.
Fold Init() into constructor.
Return span<> where possible.
Change-Id: Ie38d32efb6e63d86ae24e93684903a6dd900810f
Reviewed-on: https://pdfium-review.googlesource.com/36810
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxbarcode/qrcode/BC_QRCodeWriter.cpp')
-rw-r--r-- | fxbarcode/qrcode/BC_QRCodeWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fxbarcode/qrcode/BC_QRCodeWriter.cpp b/fxbarcode/qrcode/BC_QRCodeWriter.cpp index eb35af3867..8e4a57311a 100644 --- a/fxbarcode/qrcode/BC_QRCodeWriter.cpp +++ b/fxbarcode/qrcode/BC_QRCodeWriter.cpp @@ -83,6 +83,6 @@ uint8_t* CBC_QRCodeWriter::Encode(const WideString& contents, outWidth = qr.GetMatrixWidth(); outHeight = qr.GetMatrixWidth(); uint8_t* result = FX_Alloc2D(uint8_t, outWidth, outHeight); - memcpy(result, qr.GetMatrix()->GetArray(), outWidth * outHeight); + memcpy(result, qr.GetMatrix()->GetArray().data(), outWidth * outHeight); return result; } |