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

Unified Diff: xfa/fxbarcode/qrcode/BC_QRCoderBlockPair.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/qrcode/BC_QRCoder.cpp ('k') | xfa/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/qrcode/BC_QRCoderBlockPair.h
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderBlockPair.h b/xfa/fxbarcode/qrcode/BC_QRCoderBlockPair.h
index 5427436761d6aeb817289fc4f98cf4e31cd5c6c3..4259d6baddea027a4d97912f08fa87011d72904f 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderBlockPair.h
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderBlockPair.h
@@ -7,19 +7,22 @@
#ifndef XFA_FXBARCODE_QRCODE_BC_QRCODERBLOCKPAIR_H_
#define XFA_FXBARCODE_QRCODE_BC_QRCODERBLOCKPAIR_H_
+#include <memory>
+
class CBC_CommonByteArray;
-class CBC_QRCoderBlockPair {
- private:
- CBC_CommonByteArray* m_dataBytes;
- CBC_CommonByteArray* m_errorCorrectionBytes;
+class CBC_QRCoderBlockPair {
public:
- CBC_QRCoderBlockPair(CBC_CommonByteArray* data,
- CBC_CommonByteArray* errorCorrection);
+ CBC_QRCoderBlockPair(std::unique_ptr<CBC_CommonByteArray> data,
+ std::unique_ptr<CBC_CommonByteArray> errorCorrection);
virtual ~CBC_QRCoderBlockPair();
- CBC_CommonByteArray* GetDataBytes();
- CBC_CommonByteArray* GetErrorCorrectionBytes();
+ const CBC_CommonByteArray* GetDataBytes() const;
+ const CBC_CommonByteArray* GetErrorCorrectionBytes() const;
+
+ private:
+ std::unique_ptr<CBC_CommonByteArray> m_dataBytes;
+ std::unique_ptr<CBC_CommonByteArray> m_errorCorrectionBytes;
};
#endif // XFA_FXBARCODE_QRCODE_BC_QRCODERBLOCKPAIR_H_
« no previous file with comments | « xfa/fxbarcode/qrcode/BC_QRCoder.cpp ('k') | xfa/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698