diff options
author | Lei Zhang <thestig@chromium.org> | 2015-09-15 16:24:58 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-09-15 16:24:58 -0700 |
commit | 2ccfcae630227d50edb844aefac53ebe450ea15a (patch) | |
tree | 04308f348b11aef52f58d19076bd20eb04c579c1 /core/src/fxcrt | |
parent | 7d0fcbf8198f04a5a5bd15482fdbdae919fb1891 (diff) | |
download | pdfium-2ccfcae630227d50edb844aefac53ebe450ea15a.tar.xz |
Merge to XFA: Cleanup casting of FX_Alloc() return values.
Also convert some FX_AllocOrDie() calls to FX_Alloc().
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1332173002 .
(cherry picked from commit 6aca3e209ff6148f1d77b86b8b97d3bdf18e3eba)
Review URL: https://codereview.chromium.org/1344233002 .
Diffstat (limited to 'core/src/fxcrt')
-rw-r--r-- | core/src/fxcrt/fx_basic_array.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/fxcrt/fx_basic_array.cpp b/core/src/fxcrt/fx_basic_array.cpp index 5555ed2586..eeaa74926a 100644 --- a/core/src/fxcrt/fx_basic_array.cpp +++ b/core/src/fxcrt/fx_basic_array.cpp @@ -187,7 +187,7 @@ void* CFX_BaseSegmentedArray::Add() { return pSegment; } if (m_IndexDepth == 0) { - void** pIndex = (void**)FX_Alloc(void*, m_IndexSize); + void** pIndex = FX_Alloc(void*, m_IndexSize); pIndex[0] = m_pIndex; pIndex[1] = pSegment; m_pIndex = pIndex; @@ -208,7 +208,7 @@ void* CFX_BaseSegmentedArray::Add() { tree_size *= m_IndexSize; } if (m_DataSize == tree_size * m_SegmentSize) { - void** pIndex = (void**)FX_Alloc(void*, m_IndexSize); + void** pIndex = FX_Alloc(void*, m_IndexSize); pIndex[0] = m_pIndex; m_pIndex = pIndex; m_IndexDepth++; @@ -218,7 +218,7 @@ void* CFX_BaseSegmentedArray::Add() { void** pSpot = (void**)m_pIndex; for (i = 1; i < m_IndexDepth; i++) { if (pSpot[seg_index / tree_size] == NULL) { - pSpot[seg_index / tree_size] = (void*)FX_Alloc(void*, m_IndexSize); + pSpot[seg_index / tree_size] = FX_Alloc(void*, m_IndexSize); } pSpot = (void**)pSpot[seg_index / tree_size]; seg_index = seg_index % tree_size; |