From 981a3468319eb24e696bb64ba84d9631fd26f1f7 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 19 May 2015 15:19:32 -0700 Subject: Re-land: Remove FX_Alloc() null checks now that it can't return NULL. Fixes the ordering of some assignments broken when converting to checked numerics in CFX_PathData::AddPointCount(). Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1135893008 --- core/src/fxge/agg/agg23/agg_array.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'core/src/fxge/agg/agg23/agg_array.h') diff --git a/core/src/fxge/agg/agg23/agg_array.h b/core/src/fxge/agg/agg23/agg_array.h index b3b5f2b877..810eb4ef22 100644 --- a/core/src/fxge/agg/agg23/agg_array.h +++ b/core/src/fxge/agg/agg23/agg_array.h @@ -111,12 +111,8 @@ void pod_array::capacity(unsigned cap, unsigned extra_tail) m_capacity = 0; } else if(full_cap > m_capacity) { FX_Free(m_array); - m_array = 0; - m_capacity = 0; m_array = FX_Alloc(T, full_cap); - if (m_array) { - m_capacity = full_cap; - } + m_capacity = full_cap; } } template -- cgit v1.2.3