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

Unified Diff: xfa/fxbarcode/cbc_codebase.h

Issue 2037573005: Clean up C-Style casts in CBC_CodeBase and subclasses (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 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/cbc_code39.cpp ('k') | xfa/fxbarcode/cbc_codebase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/cbc_codebase.h
diff --git a/xfa/fxbarcode/cbc_codebase.h b/xfa/fxbarcode/cbc_codebase.h
index 2124f75d7885a5a940993f31a60d26165f83fd30..1ecfe20b278fca573e25384cb2e154ce51c31d12 100644
--- a/xfa/fxbarcode/cbc_codebase.h
+++ b/xfa/fxbarcode/cbc_codebase.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXBARCODE_CBC_CODEBASE_H_
#define XFA_FXBARCODE_CBC_CODEBASE_H_
+#include <memory>
+
#include "core/fxcrt/include/fx_system.h"
#include "core/fxge/include/fx_dib.h"
#include "xfa/fxbarcode/include/BC_Library.h"
@@ -18,7 +20,7 @@ class CFX_RenderDevice;
class CBC_CodeBase {
public:
- CBC_CodeBase();
+ CBC_CodeBase(CBC_Reader* pReader, CBC_Writer* pWriter);
virtual ~CBC_CodeBase();
virtual BC_TYPE GetType() = 0;
@@ -35,18 +37,17 @@ class CBC_CodeBase {
int32_t& e) = 0;
virtual CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e) = 0;
- virtual FX_BOOL SetCharEncoding(int32_t encoding);
- virtual FX_BOOL SetModuleHeight(int32_t moduleHeight);
- virtual FX_BOOL SetModuleWidth(int32_t moduleWidth);
-
- virtual FX_BOOL SetHeight(int32_t height);
- virtual FX_BOOL SetWidth(int32_t width);
- virtual void SetBackgroundColor(FX_ARGB backgroundColor);
- virtual void SetBarcodeColor(FX_ARGB foregroundColor);
+ FX_BOOL SetCharEncoding(int32_t encoding);
+ FX_BOOL SetModuleHeight(int32_t moduleHeight);
+ FX_BOOL SetModuleWidth(int32_t moduleWidth);
+ FX_BOOL SetHeight(int32_t height);
+ FX_BOOL SetWidth(int32_t width);
+ void SetBackgroundColor(FX_ARGB backgroundColor);
+ void SetBarcodeColor(FX_ARGB foregroundColor);
protected:
- CBC_Writer* m_pBCWriter;
- CBC_Reader* m_pBCReader;
+ std::unique_ptr<CBC_Reader> m_pBCReader;
+ std::unique_ptr<CBC_Writer> m_pBCWriter;
};
#endif // XFA_FXBARCODE_CBC_CODEBASE_H_
« no previous file with comments | « xfa/fxbarcode/cbc_code39.cpp ('k') | xfa/fxbarcode/cbc_codebase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698