From 2ccfcae630227d50edb844aefac53ebe450ea15a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 15 Sep 2015 16:24:58 -0700 Subject: 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 . --- core/src/fxcrt/fx_basic_array.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/src/fxcrt') 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; -- cgit v1.2.3