Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Unified Diff: xfa/fxbarcode/pdf417/BC_PDF417.h

Issue 2221023003: Use smart pointers for class owned pointers in xfa/fxbarcode (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp ('k') | xfa/fxbarcode/pdf417/BC_PDF417.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/pdf417/BC_PDF417.h
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.h b/xfa/fxbarcode/pdf417/BC_PDF417.h
index f2fb5cb89e7feafda9fc2a2381523a58c8316edd..eeffc1e6eec94cfc08634b6234307250fe2fe21a 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417.h
+++ b/xfa/fxbarcode/pdf417/BC_PDF417.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXBARCODE_PDF417_BC_PDF417_H_
#define XFA_FXBARCODE_PDF417_BC_PDF417_H_
+#include <memory>
+
#include "core/fxcrt/include/fx_basic.h"
#include "xfa/fxbarcode/pdf417/BC_PDF417Compaction.h"
@@ -16,7 +18,7 @@ class CBC_BarcodeMatrix;
class CBC_PDF417 {
public:
CBC_PDF417();
- CBC_PDF417(FX_BOOL compact);
+ explicit CBC_PDF417(FX_BOOL compact);
virtual ~CBC_PDF417();
CBC_BarcodeMatrix* getBarcodeMatrix();
@@ -34,18 +36,10 @@ class CBC_PDF417 {
static const int32_t START_PATTERN = 0x1fea8;
static const int32_t STOP_PATTERN = 0x3fa29;
static const int32_t CODEWORD_TABLE[][929];
- static FX_FLOAT PREFERRED_RATIO;
- static FX_FLOAT DEFAULT_MODULE_WIDTH;
- static FX_FLOAT HEIGHT;
- CBC_BarcodeMatrix* m_barcodeMatrix;
- FX_BOOL m_compact;
- Compaction m_compaction;
- int32_t m_minCols;
- int32_t m_maxCols;
- int32_t m_maxRows;
- int32_t m_minRows;
+ static constexpr FX_FLOAT PREFERRED_RATIO = 3.0f;
+ static constexpr FX_FLOAT DEFAULT_MODULE_WIDTH = 0.357f;
+ static constexpr FX_FLOAT HEIGHT = 2.0f;
- private:
static int32_t calculateNumberOfRows(int32_t m, int32_t k, int32_t c);
static int32_t getNumberOfPadCodewords(int32_t m,
int32_t k,
@@ -60,6 +54,14 @@ class CBC_PDF417 {
CFX_Int32Array* determineDimensions(int32_t sourceCodeWords,
int32_t errorCorrectionCodeWords,
int32_t& e);
+
+ std::unique_ptr<CBC_BarcodeMatrix> m_barcodeMatrix;
+ FX_BOOL m_compact;
+ Compaction m_compaction;
+ int32_t m_minCols;
+ int32_t m_maxCols;
+ int32_t m_maxRows;
+ int32_t m_minRows;
};
#endif // XFA_FXBARCODE_PDF417_BC_PDF417_H_
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp ('k') | xfa/fxbarcode/pdf417/BC_PDF417.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698