From 8ce49f8f25e993a31e6abe9e656784abbff0650f Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Thu, 23 Aug 2018 19:53:08 +0000 Subject: Swap width and height params in CBC_BarcodeMatrix constructor. Change-Id: I74f3a147914c6483e7d443cff70e09115c424ca5 Reviewed-on: https://pdfium-review.googlesource.com/41091 Commit-Queue: Henrique Nakashima Reviewed-by: Lei Zhang --- fxbarcode/pdf417/BC_PDF417.cpp | 2 +- fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp | 2 +- fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fxbarcode/pdf417/BC_PDF417.cpp b/fxbarcode/pdf417/BC_PDF417.cpp index 30b3f42081..ee452422c6 100644 --- a/fxbarcode/pdf417/BC_PDF417.cpp +++ b/fxbarcode/pdf417/BC_PDF417.cpp @@ -438,7 +438,7 @@ bool CBC_PDF417::generateBarcodeLogic(WideString msg, return false; } WideString fullCodewords = dataCodewords + ec; - m_barcodeMatrix = pdfium::MakeUnique(rows, cols); + m_barcodeMatrix = pdfium::MakeUnique(cols, rows); encodeLowLevel(fullCodewords, cols, rows, errorCorrectionLevel, m_barcodeMatrix.get()); return true; diff --git a/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp b/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp index 32db82e3d4..1d05486f30 100644 --- a/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp +++ b/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp @@ -24,7 +24,7 @@ #include "fxbarcode/pdf417/BC_PDF417BarcodeRow.h" #include "third_party/base/ptr_util.h" -CBC_BarcodeMatrix::CBC_BarcodeMatrix(size_t height, size_t width) +CBC_BarcodeMatrix::CBC_BarcodeMatrix(size_t width, size_t height) : m_width((width + 4) * 17 + 1), m_height(height) { m_matrix.resize(m_height); for (size_t i = 0; i < m_height; ++i) diff --git a/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h b/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h index bee2ef9cb9..1359ac2e63 100644 --- a/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h +++ b/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h @@ -14,7 +14,7 @@ class CBC_BarcodeRow; class CBC_BarcodeMatrix { public: - CBC_BarcodeMatrix(size_t height, size_t width); + CBC_BarcodeMatrix(size_t width, size_t height); virtual ~CBC_BarcodeMatrix(); CBC_BarcodeRow* getRow(size_t row) const { return m_matrix[row].get(); } -- cgit v1.2.3