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

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

Issue 1693913003: Remove the FX_MIN macro. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 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/fxcodec/codec/fx_codec_flate.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/win32/fx_win32_gdipext.cpp
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index 1e4f89540bb4a6e27937187d8243b30268500180..2d37865437148c16736cb1d3600c3553faa84b8a 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -1302,7 +1302,7 @@ class GpStream final : public IStream {
return HRESULT_FROM_WIN32(ERROR_END_OF_MEDIA);
}
bytes_left = m_InterStream.GetLength() - m_ReadPos;
- bytes_out = FX_MIN(cb, bytes_left);
+ bytes_out = std::min(pdfium::base::checked_cast<size_t>(cb), bytes_left);
FXSYS_memcpy(Output, m_InterStream.GetBuffer() + m_ReadPos, bytes_out);
m_ReadPos += (int32_t)bytes_out;
if (pcbRead) {
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_flate.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698