From 738b08ce6b9f80d93b815411b47c2b11c2f090f6 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 1 Mar 2016 14:45:20 -0500 Subject: Fix and enable lint checks. This CL fixes and enables: * readability/namespace * readability/multiline_string * readability/multiline_comment * readability/inheritance * readability/function * readability/braces R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1747123002 . --- core/include/fxcrt/fx_basic.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'core/include/fxcrt/fx_basic.h') diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 6e092dd540..006b2b377d 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -315,13 +315,12 @@ class CFX_ArrayTemplate : public CFX_BasicArray { TYPE* GetData() { return (TYPE*)m_pData; } FX_BOOL SetAtGrow(int nIndex, TYPE newElement) { - if (nIndex < 0) { + if (nIndex < 0) return FALSE; - } - if (nIndex >= m_nSize) - if (!SetSize(nIndex + 1)) { - return FALSE; - } + + if (nIndex >= m_nSize && !SetSize(nIndex + 1)) + return FALSE; + ((TYPE*)m_pData)[nIndex] = newElement; return TRUE; } -- cgit v1.2.3