summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/fxet_list.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-15 12:33:58 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-03-15 21:10:30 +0000
commit9bbc354eba593527e26ed290e3b25a71959c8f62 (patch)
tree095f0ebd81eb9869ece70c9c81e9ebf4de7d0ac7 /fpdfsdk/fxedit/fxet_list.h
parenta12159b17085796e2b72d2b49e850092e0b4e8b7 (diff)
downloadpdfium-9bbc354eba593527e26ed290e3b25a71959c8f62.tar.xz
remove CFX_ArrayTemplate from fxet_list.
Change-Id: I7a26c961c6c2667440bcc04bfd636087660ea238 Reviewed-on: https://pdfium-review.googlesource.com/3063 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fxedit/fxet_list.h')
-rw-r--r--fpdfsdk/fxedit/fxet_list.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/fpdfsdk/fxedit/fxet_list.h b/fpdfsdk/fxedit/fxet_list.h
index 00e03d8213..65426e0681 100644
--- a/fpdfsdk/fxedit/fxet_list.h
+++ b/fpdfsdk/fxedit/fxet_list.h
@@ -8,6 +8,7 @@
#define FPDFSDK_FXEDIT_FXET_LIST_H_
#include <memory>
+#include <vector>
#include "core/fxcrt/fx_coordinates.h"
#include "fpdfsdk/fxedit/fx_edit.h"
@@ -168,21 +169,6 @@ class CFX_ListContainer {
CLST_Rect m_rcContent; // positive forever!
};
-template <class TYPE>
-class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE> {
- public:
- bool IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; }
- TYPE GetAt(int32_t nIndex) const {
- if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize())
- return CFX_ArrayTemplate<TYPE>::GetAt(nIndex);
- return nullptr;
- }
- void RemoveAt(int32_t nIndex) {
- if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize())
- CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex);
- }
-};
-
struct CPLST_Select_Item {
CPLST_Select_Item(int32_t other_nItemIndex, int32_t other_nState) {
nItemIndex = other_nItemIndex;
@@ -295,7 +281,7 @@ class CFX_ListCtrl : protected CFX_ListContainer {
int32_t m_nFootIndex; // for multiple
bool m_bCtrlSel; // for multiple
int32_t m_nCaretIndex; // for multiple
- CLST_ArrayTemplate<CFX_ListItem*> m_aListItems;
+ std::vector<std::unique_ptr<CFX_ListItem>> m_ListItems;
float m_fFontSize;
IPVT_FontMap* m_pFontMap;
bool m_bMultiple;