From 95dd8dad6b1b2ac31aca84afe677205c7ed47f7f Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 30 Jan 2018 18:31:40 +0000 Subject: 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 Reviewed-by: dsinclair --- core/fxge/win32/fx_win32_gdipext.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/fxge/win32/fx_win32_gdipext.cpp') 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); -- cgit v1.2.3