summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/fwl_formimp.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-29 09:45:46 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-29 09:45:46 -0700
commitd15ba4e29607665db35bc6fb610cc566981b324a (patch)
treee80465d1a9849f909b57f9ab82ad4ca58751cc0e /xfa/fwl/core/fwl_formimp.cpp
parentb7a9604a34c3edf2d26dd109577fc417e45e149b (diff)
downloadpdfium-d15ba4e29607665db35bc6fb610cc566981b324a.tar.xz
Replace CFX_PtryArray with typesafe CFX_ArrayTemplate, Part 7
Remaining uses are all in fxbarcode/. Review-Url: https://codereview.chromium.org/1937453002
Diffstat (limited to 'xfa/fwl/core/fwl_formimp.cpp')
-rw-r--r--xfa/fwl/core/fwl_formimp.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp
index 2fd85a8d0e..bbec673ed6 100644
--- a/xfa/fwl/core/fwl_formimp.cpp
+++ b/xfa/fwl/core/fwl_formimp.cpp
@@ -526,32 +526,32 @@ CFWL_SysBtn* CFWL_FormImp::GetSysBtnByState(uint32_t dwState) {
return NULL;
}
CFWL_SysBtn* CFWL_FormImp::GetSysBtnByIndex(int32_t nIndex) {
- if (nIndex < 0) {
- return NULL;
- }
- CFX_PtrArray arrBtn;
- if (m_pMinBox) {
+ if (nIndex < 0)
+ return nullptr;
+
+ CFX_ArrayTemplate<CFWL_SysBtn*> arrBtn;
+ if (m_pMinBox)
arrBtn.Add(m_pMinBox);
- }
- if (m_pMaxBox) {
+
+ if (m_pMaxBox)
arrBtn.Add(m_pMaxBox);
- }
- if (m_pCloseBox) {
+
+ if (m_pCloseBox)
arrBtn.Add(m_pCloseBox);
- }
- return static_cast<CFWL_SysBtn*>(arrBtn[nIndex]);
+
+ return arrBtn[nIndex];
}
int32_t CFWL_FormImp::GetSysBtnIndex(CFWL_SysBtn* pBtn) {
- CFX_PtrArray arrBtn;
- if (m_pMinBox) {
+ CFX_ArrayTemplate<CFWL_SysBtn*> arrBtn;
+ if (m_pMinBox)
arrBtn.Add(m_pMinBox);
- }
- if (m_pMaxBox) {
+
+ if (m_pMaxBox)
arrBtn.Add(m_pMaxBox);
- }
- if (m_pCloseBox) {
+
+ if (m_pCloseBox)
arrBtn.Add(m_pCloseBox);
- }
+
return arrBtn.Find(pBtn);
}
FX_FLOAT CFWL_FormImp::GetCaptionHeight() {