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

Unified Diff: fpdfsdk/include/fsdk_annothandler.h

Issue 2166953005: Remove the use of handler array in CPDFSDK_AnnotHandlerMgr (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 5 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 | « fpdfsdk/fsdk_annothandler.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/fsdk_annothandler.h
diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h
index 179843da8a6f9557e0d4e3b3522812416668f4e5..1e25538a32fda19e1d9bb3378679fbc4c461d6a0 100644
--- a/fpdfsdk/include/fsdk_annothandler.h
+++ b/fpdfsdk/include/fsdk_annothandler.h
@@ -8,6 +8,7 @@
#define FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_
#include <map>
+#include <memory>
#include <vector>
#include "core/fxcrt/include/fx_basic.h"
@@ -314,7 +315,6 @@ class CPDFSDK_XFAAnnotHandler : public IPDFSDK_AnnotHandler {
};
#endif // PDF_ENABLE_XFA
-#define CBA_AnnotHandlerArray CFX_ArrayTemplate<IPDFSDK_AnnotHandler*>
class CPDFSDK_AnnotHandlerMgr {
public:
// Destroy the handler
@@ -409,8 +409,8 @@ class CPDFSDK_AnnotHandlerMgr {
CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext);
private:
- CBA_AnnotHandlerArray m_Handlers;
- std::map<CFX_ByteString, IPDFSDK_AnnotHandler*> m_mapType2Handler;
+ std::map<CFX_ByteString, std::unique_ptr<IPDFSDK_AnnotHandler>>
+ m_mapType2Handler;
CPDFDoc_Environment* m_pApp;
};
« no previous file with comments | « fpdfsdk/fsdk_annothandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698