summaryrefslogtreecommitdiff
path: root/core/src/fxge/win32/fx_win32_dwrite.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-22 14:59:55 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-22 14:59:55 -0700
commit7cc97521db1e52d5927f5605de5f9a7102f8af40 (patch)
treedf96cf98cd470e794c7817f347511f3c554c96e4 /core/src/fxge/win32/fx_win32_dwrite.cpp
parentb05f1fd710496dea44b001bb905fa1c16a39bb28 (diff)
downloadpdfium-7cc97521db1e52d5927f5605de5f9a7102f8af40.tar.xz
Fix else-after-returns throughout pdfium.
Driven by CS search for pcre:yes file:third_party/pdfium/ -file:pdfium/third_party/ \breturn\b[^;]*;\s*\n*\s*\}*\s*\n*\r*else Note: Care is required to ensure the preceding block is not an else-if. As usual, removed any tabs I saw. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1243883003 .
Diffstat (limited to 'core/src/fxge/win32/fx_win32_dwrite.cpp')
-rw-r--r--core/src/fxge/win32/fx_win32_dwrite.cpp20
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 889a5684b7..65a35d86a1 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()
{