summaryrefslogtreecommitdiff
path: root/xfa/fwl/core
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/core')
-rw-r--r--xfa/fwl/core/fwl_noteimp.cpp15
-rw-r--r--xfa/fwl/core/fwl_noteimp.h6
2 files changed, 10 insertions, 11 deletions
diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp
index 5cd643a81b..cc548a5728 100644
--- a/xfa/fwl/core/fwl_noteimp.cpp
+++ b/xfa/fwl/core/fwl_noteimp.cpp
@@ -164,8 +164,7 @@ IFWL_NoteLoop* CFWL_NoteDriver::PopNoteLoop() {
int32_t pos = m_noteLoopQueue.GetSize();
if (pos <= 0)
return NULL;
- IFWL_NoteLoop* p =
- static_cast<IFWL_NoteLoop*>(m_noteLoopQueue.GetAt(pos - 1));
+ IFWL_NoteLoop* p = m_noteLoopQueue.GetAt(pos - 1);
m_noteLoopQueue.RemoveAt(pos - 1);
return p;
}
@@ -351,7 +350,7 @@ FX_BOOL CFWL_NoteDriver::UnqueueMessage(CFWL_NoteLoop* pNoteLoop) {
if (m_noteQueue.GetSize() < 1) {
return FALSE;
}
- CFWL_Message* pMessage = static_cast<CFWL_Message*>(m_noteQueue[0]);
+ CFWL_Message* pMessage = m_noteQueue[0];
m_noteQueue.RemoveAt(0);
if (!IsValidMessage(pMessage)) {
pMessage->Release();
@@ -365,7 +364,7 @@ FX_BOOL CFWL_NoteDriver::UnqueueMessage(CFWL_NoteLoop* pNoteLoop) {
CFWL_NoteLoop* CFWL_NoteDriver::GetTopLoop() {
int32_t size = m_noteLoopQueue.GetSize();
if (size <= 0)
- return NULL;
+ return nullptr;
return static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[size - 1]);
}
int32_t CFWL_NoteDriver::CountLoop() {
@@ -885,14 +884,14 @@ void CFWL_ToolTipContainer::DeleteInstance() {
}
}
FX_ERR CFWL_ToolTipContainer::AddToolTipTarget(IFWL_ToolTipTarget* pTarget) {
- if (m_arrWidget.Find((void*)pTarget) < 0) {
- m_arrWidget.Add((void*)pTarget);
+ if (m_arrWidget.Find(pTarget) < 0) {
+ m_arrWidget.Add(pTarget);
return FWL_ERR_Succeeded;
}
return FWL_ERR_Indefinite;
}
FX_ERR CFWL_ToolTipContainer::RemoveToolTipTarget(IFWL_ToolTipTarget* pTarget) {
- int index = m_arrWidget.Find((void*)pTarget);
+ int index = m_arrWidget.Find(pTarget);
if (index >= 0) {
m_arrWidget.RemoveAt(index);
return FWL_ERR_Succeeded;
@@ -902,7 +901,7 @@ FX_ERR CFWL_ToolTipContainer::RemoveToolTipTarget(IFWL_ToolTipTarget* pTarget) {
FX_BOOL CFWL_ToolTipContainer::HasToolTip(IFWL_Widget* pWedget) {
int32_t iCount = m_arrWidget.GetSize();
for (int32_t i = 0; i < iCount; i++) {
- IFWL_ToolTipTarget* p = static_cast<IFWL_ToolTipTarget*>(m_arrWidget[i]);
+ IFWL_ToolTipTarget* p = m_arrWidget[i];
if (p->GetWidget() == pWedget) {
pCurTarget = p;
return TRUE;
diff --git a/xfa/fwl/core/fwl_noteimp.h b/xfa/fwl/core/fwl_noteimp.h
index 927afd6c9d..f51f09cf00 100644
--- a/xfa/fwl/core/fwl_noteimp.h
+++ b/xfa/fwl/core/fwl_noteimp.h
@@ -97,8 +97,8 @@ class CFWL_NoteDriver : public IFWL_NoteDriver {
IFWL_Widget* GetMessageForm(IFWL_Widget* pDstTarget);
void ClearInvalidEventTargets(FX_BOOL bRemoveAll);
CFX_ArrayTemplate<CFWL_TargetImp*> m_forms;
- CFX_PtrArray m_noteQueue;
- CFX_PtrArray m_noteLoopQueue;
+ CFX_ArrayTemplate<CFWL_Message*> m_noteQueue;
+ CFX_ArrayTemplate<IFWL_NoteLoop*> m_noteLoopQueue;
CFX_MapPtrToPtr m_eventTargets;
int32_t m_sendEventCalled;
IFWL_Widget* m_pHover;
@@ -147,7 +147,7 @@ class CFWL_ToolTipContainer {
IFWL_ToolTipTarget* pCurTarget;
CFWL_ToolTipImp* m_pToolTipImp;
CFWL_CoreToolTipDP* m_ToolTipDp;
- CFX_PtrArray m_arrWidget;
+ CFX_ArrayTemplate<IFWL_ToolTipTarget*> m_arrWidget;
private:
static CFWL_ToolTipContainer* s_pInstance;