diff options
author | Lei Zhang <thestig@chromium.org> | 2018-01-30 18:31:40 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-30 18:31:40 +0000 |
commit | 95dd8dad6b1b2ac31aca84afe677205c7ed47f7f (patch) | |
tree | ecd066f9fd3033e1f6218a77ec8b2029ff63b592 /core/fxge/win32/fx_win32_gdipext.cpp | |
parent | acbef05aa0dbceabf47d700968ccd6569524fe74 (diff) | |
download | pdfium-95dd8dad6b1b2ac31aca84afe677205c7ed47f7f.tar.xz |
Remove not reachable branch in fxge code.
BUG=chromium:805881
Change-Id: I5f920649f425d0cfc47c780b36ed70f23cbe1299
Reviewed-on: https://pdfium-review.googlesource.com/24191
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/win32/fx_win32_gdipext.cpp')
-rw-r--r-- | core/fxge/win32/fx_win32_gdipext.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp index d784a0fa37..64c8ea7408 100644 --- a/core/fxge/win32/fx_win32_gdipext.cpp +++ b/core/fxge/win32/fx_win32_gdipext.cpp @@ -730,13 +730,12 @@ GpPen* GdipCreatePenImpl(const CFX_GraphStateData* pGraphState, bool bTextMode) { CGdiplusExt& GdiplusExt = ((CWin32Platform*)CFX_GEModule::Get()->GetPlatformData())->m_GdiplusExt; - float width = pGraphState ? pGraphState->m_LineWidth : 1.0f; + float width = pGraphState->m_LineWidth; if (!bTextMode) { float unit = pMatrix ? 1.0f / ((pMatrix->GetXUnit() + pMatrix->GetYUnit()) / 2) : 1.0f; - if (width < unit) - width = unit; + width = std::max(width, unit); } GpPen* pPen = nullptr; CallFunc(GdipCreatePen1)((Gdiplus::ARGB)argb, width, UnitWorld, &pPen); |