From 388a3b0b8d6f75d47978c08299300f121f04884c Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 13 Aug 2015 15:24:19 -0700 Subject: Remove if checks after new. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1287863002 . --- fpdfsdk/include/javascript/JS_Object.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/include/javascript') diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h index fd63d98cbc..c0c3ab0c46 100644 --- a/fpdfsdk/include/javascript/JS_Object.h +++ b/fpdfsdk/include/javascript/JS_Object.h @@ -109,11 +109,10 @@ struct JS_TIMER_MAPARRAY { if (JS_TIMER_MAP* pMap = m_Array.GetAt(i)) pMap->pTimer = pTimer; } else { - if (JS_TIMER_MAP* pMap = new JS_TIMER_MAP) { - pMap->nID = nIndex; - pMap->pTimer = pTimer; - m_Array.Add(pMap); - } + JS_TIMER_MAP* pMap = new JS_TIMER_MAP; + pMap->nID = nIndex; + pMap->pTimer = pTimer; + m_Array.Add(pMap); } } -- cgit v1.2.3