diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-06 13:57:04 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-06 18:16:39 +0000 |
commit | a5100b0ac84853615e5c9518a9514f14a187d4a3 (patch) | |
tree | d0d4084ad01c554e559fe54e6584b9f7801e122a /core/fxge | |
parent | 8f6084b710362e950ae752ac0f5aa6ba954fdbfd (diff) | |
download | pdfium-a5100b0ac84853615e5c9518a9514f14a187d4a3.tar.xz |
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 <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r-- | core/fxge/win32/fx_win32_print.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<size_t>(LF_FACESIZE - 1); memcpy(lf.lfFaceName, wsName.c_str(), sizeof(lf.lfFaceName[0]) * iNameLen); lf.lfFaceName[iNameLen] = 0; |