summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_link.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
commitd7e5cc754a937605d1f73db5e7967c58ddd80742 (patch)
treeed28e012c4d6a46b7f29f15a0c060474c27d4286 /core/src/fpdfdoc/doc_link.cpp
parentbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (diff)
downloadpdfium-d7e5cc754a937605d1f73db5e7967c58ddd80742.tar.xz
Merge to XFA: Remove typdefs for pointer types in fx_system.h.
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.
Diffstat (limited to 'core/src/fpdfdoc/doc_link.cpp')
-rw-r--r--core/src/fpdfdoc/doc_link.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp
index 71be0c36ab..e614af3ec8 100644
--- a/core/src/fpdfdoc/doc_link.cpp
+++ b/core/src/fpdfdoc/doc_link.cpp
@@ -11,7 +11,8 @@ CPDF_LinkList::~CPDF_LinkList()
{
FX_POSITION pos = m_PageMap.GetStartPosition();
while (pos) {
- FX_LPVOID key, value;
+ void* key;
+ void* value;
m_PageMap.GetNextAssoc(pos, key, value);
delete (CFX_PtrArray*)value;
}
@@ -23,12 +24,9 @@ CFX_PtrArray* CPDF_LinkList::GetPageLinks(CPDF_Page* pPage)
return NULL;
}
CFX_PtrArray* pPageLinkList = NULL;
- if (!m_PageMap.Lookup((FX_LPVOID)(uintptr_t)objnum, (FX_LPVOID&)pPageLinkList)) {
- pPageLinkList = FX_NEW CFX_PtrArray;
- if (pPageLinkList == NULL) {
- return NULL;
- }
- m_PageMap.SetAt((FX_LPVOID)(uintptr_t)objnum, pPageLinkList);
+ if (!m_PageMap.Lookup((void*)(uintptr_t)objnum, (void*&)pPageLinkList)) {
+ pPageLinkList = new CFX_PtrArray;
+ m_PageMap.SetAt((void*)(uintptr_t)objnum, pPageLinkList);
LoadPageLinks(pPage, pPageLinkList);
}
return pPageLinkList;