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

Unified Diff: core/fxge/ge/cfx_renderdevice.cpp

Issue 2640143003: Update safe numerics package to get bitwise ops (Closed)
Patch Set: Fix calling conventions Created 3 years, 11 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
Index: core/fxge/ge/cfx_renderdevice.cpp
diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp
index 9c67a7d1e791991c815e768fbd5282acd05ceda4..cad00b9a387a061b5ec7e2487649a65acd6e58f4 100644
--- a/core/fxge/ge/cfx_renderdevice.cpp
+++ b/core/fxge/ge/cfx_renderdevice.cpp
@@ -1022,13 +1022,14 @@ bool CFX_RenderDevice::DrawNormalText(int nChars,
bool bBGRStripe = !!(text_flags & FXTEXT_BGR_STRIPE);
ncols /= 3;
int x_subpixel = (int)(glyph.m_fOriginX * 3) % 3;
- int start_col = std::max(left.ValueOrDie(), 0);
+ int start_col = std::max(static_cast<int>(left.ValueOrDie<int>()), 0);
pdfium::base::CheckedNumeric<int> end_col_safe = left;
end_col_safe += ncols;
if (!end_col_safe.IsValid())
return false;
- int end_col = std::min(end_col_safe.ValueOrDie(), dest_width);
+ int end_col =
+ std::min(static_cast<int>(end_col_safe.ValueOrDie<int>()), dest_width);
if (start_col >= end_col)
continue;

Powered by Google App Engine
This is Rietveld 408576698