summaryrefslogtreecommitdiff
path: root/core/src/fxcrt
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-09-11 13:13:31 -0700
committerLei Zhang <thestig@chromium.org>2015-09-11 13:13:31 -0700
commit6aca3e209ff6148f1d77b86b8b97d3bdf18e3eba (patch)
tree280c27ff9c75ded60b562f246973e8335e3b3b02 /core/src/fxcrt
parentf9e40aec10263f9445d69598657f42550294d653 (diff)
downloadpdfium-6aca3e209ff6148f1d77b86b8b97d3bdf18e3eba.tar.xz
Cleanup casting of FX_Alloc() return values.
Also convert some FX_AllocOrDie() calls to FX_Alloc(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1332173002 .
Diffstat (limited to 'core/src/fxcrt')
-rw-r--r--core/src/fxcrt/fx_basic_array.cpp6
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;