summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-07-21 12:26:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-21 12:26:18 -0700
commit9ca2b09126b80c03655f0eee1f02e1b2d0a18230 (patch)
tree4bb8fff9cdb6aa9bdc03687f3fb696cfaac8296c /fpdfsdk/include
parenta89f6be04bebbbf01686db167446df081a7042e0 (diff)
downloadpdfium-9ca2b09126b80c03655f0eee1f02e1b2d0a18230.tar.xz
Remove the use of handler array in CPDFSDK_AnnotHandlerMgr
Use map to store and manage the handlers directly instead of needing an extra array. Review-Url: https://codereview.chromium.org/2166953005
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r--fpdfsdk/include/fsdk_annothandler.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h
index 179843da8a..1e25538a32 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;
};