Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1896)

Unified Diff: core/src/fxge/win32/fx_win32_dwrite.cpp

Issue 1243953004: Re-land else-after-returns (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxge/win32/fx_win32_dib.cpp ('k') | core/src/fxge/win32/fx_win32_gdipext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/win32/fx_win32_dwrite.cpp
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp
index 889a5684b703865c23c2e9db6a8025ff3f1fa847..65a35d86a17bcf3d98365e476bd2814ff87649cd 100644
--- a/core/src/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/src/fxge/win32/fx_win32_dwrite.cpp
@@ -282,10 +282,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()
{
@@ -306,16 +305,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)
{
@@ -341,10 +338,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()
{
« no previous file with comments | « core/src/fxge/win32/fx_win32_dib.cpp ('k') | core/src/fxge/win32/fx_win32_gdipext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698