From a5100b0ac84853615e5c9518a9514f14a187d4a3 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 6 Sep 2017 13:57:04 -0400 Subject: Fix issue with integer types on win32 in std::min DEPS roll is failing since std::min(size_t, int) -> int doesn't make sense. min is templated on a single class, i.e. std::min(size_t, size_t) -> size_t. BUG=pdfium:828 Change-Id: Idec3ac7bdbf1d22b8c878a95bd9c44c9a94bbccf Reviewed-on: https://pdfium-review.googlesource.com/13310 Reviewed-by: dsinclair Commit-Queue: Ryan Harrison --- core/fxge/win32/fx_win32_print.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fxge/win32') diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp index 23c7c0e30c..24cf42aa6b 100644 --- a/core/fxge/win32/fx_win32_print.cpp +++ b/core/fxge/win32/fx_win32_print.cpp @@ -233,7 +233,7 @@ bool CGdiPrinterDriver::DrawDeviceText(int nChars, lf.lfCharSet = DEFAULT_CHARSET; const CFX_WideString wsName = pFont->GetFaceName().UTF8Decode(); - int iNameLen = std::min(wsName.GetLength(), LF_FACESIZE - 1); + size_t iNameLen = std::min(wsName.GetLength(), static_cast(LF_FACESIZE - 1); memcpy(lf.lfFaceName, wsName.c_str(), sizeof(lf.lfFaceName[0]) * iNameLen); lf.lfFaceName[iNameLen] = 0; -- cgit v1.2.3