diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-03-01 14:45:20 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-03-01 14:45:20 -0500 |
commit | 738b08ce6b9f80d93b815411b47c2b11c2f090f6 (patch) | |
tree | ec648b9bdf6d9597043bfe657d56f98dc3cdef30 /core/include | |
parent | 50dfc4a7068e8e08105f7b9a3945136e7246e677 (diff) | |
download | pdfium-738b08ce6b9f80d93b815411b47c2b11c2f090f6.tar.xz |
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 .
Diffstat (limited to 'core/include')
-rw-r--r-- | core/include/fpdfapi/fpdf_resource.h | 2 | ||||
-rw-r--r-- | core/include/fxcrt/fx_basic.h | 11 | ||||
-rw-r--r-- | core/include/fxcrt/fx_memory.h | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h index 23e1b55efb..450e878fa1 100644 --- a/core/include/fpdfapi/fpdf_resource.h +++ b/core/include/fpdfapi/fpdf_resource.h @@ -166,7 +166,7 @@ class CPDF_Font { CFX_ByteString*& pCharNames, FX_BOOL bEmbedded, FX_BOOL bTrueType); - void LoadFontDescriptor(CPDF_Dictionary*); + void LoadFontDescriptor(CPDF_Dictionary* pDict); void CheckFontMetrics(); CFX_ByteString m_BaseFont; 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; } diff --git a/core/include/fxcrt/fx_memory.h b/core/include/fxcrt/fx_memory.h index d64844e743..b9b1888930 100644 --- a/core/include/fxcrt/fx_memory.h +++ b/core/include/fxcrt/fx_memory.h @@ -98,7 +98,7 @@ class CFX_GrowOnlyPool { void* Realloc(void* p, size_t new_size) { return NULL; } - void Free(void*) {} + void Free(void* mem) {} void FreeAll(); |