diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-23 14:42:09 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-23 14:42:09 -0700 |
commit | 2f2ffece124e4ed4b96d2846263015d4b5ad6c00 (patch) | |
tree | 6966e44279e8d9e1516b7c71219cf66f77a89ca2 /core/src/fxge/win32/fx_win32_dwrite.cpp | |
parent | d07958fd2d1c4134d865f4ccb056eb925aaa7d2a (diff) | |
download | pdfium-2f2ffece124e4ed4b96d2846263015d4b5ad6c00.tar.xz |
Merge to XFA - else after returns.
(cherry picked from commit 3c012fef2bb72c8ec1faa73e11ee35539b2559d6)
Original Review URL: https://codereview.chromium.org/1243953004 .
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1239313005 .
Diffstat (limited to 'core/src/fxge/win32/fx_win32_dwrite.cpp')
-rw-r--r-- | core/src/fxge/win32/fx_win32_dwrite.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp index 7949888ac2..e5db76d836 100644 --- a/core/src/fxge/win32/fx_win32_dwrite.cpp +++ b/core/src/fxge/win32/fx_win32_dwrite.cpp @@ -286,10 +286,9 @@ HRESULT STDMETHODCALLTYPE CDwFontFileStream::QueryInterface(REFIID iid, void** p *ppvObject = this; AddRef(); return S_OK; - } else { - *ppvObject = NULL; - return E_NOINTERFACE; } + *ppvObject = NULL; + return E_NOINTERFACE; } ULONG STDMETHODCALLTYPE CDwFontFileStream::AddRef() { @@ -310,16 +309,14 @@ HRESULT STDMETHODCALLTYPE CDwFontFileStream::ReadFileFragment( OUT void** fragmentContext ) { - if (fileOffset <= resourceSize_ && - fragmentSize <= resourceSize_ - fileOffset) { + if (fileOffset <= resourceSize_ && fragmentSize <= resourceSize_ - fileOffset) { *fragmentStart = static_cast<uint8_t const*>(resourcePtr_) + static_cast<size_t>(fileOffset); *fragmentContext = NULL; return S_OK; - } else { - *fragmentStart = NULL; - *fragmentContext = NULL; - return E_FAIL; } + *fragmentStart = NULL; + *fragmentContext = NULL; + return E_FAIL; } void STDMETHODCALLTYPE CDwFontFileStream::ReleaseFileFragment(void* fragmentContext) { @@ -345,10 +342,9 @@ HRESULT STDMETHODCALLTYPE CDwFontFileLoader::QueryInterface(REFIID iid, void** p *ppvObject = this; AddRef(); return S_OK; - } else { - *ppvObject = NULL; - return E_NOINTERFACE; } + *ppvObject = NULL; + return E_NOINTERFACE; } ULONG STDMETHODCALLTYPE CDwFontFileLoader::AddRef() { |