[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/win

Christian Lohmaier lohmaier+LibreOffice at googlemail.com
Tue Mar 15 23:39:41 UTC 2016


 vcl/win/source/gdi/winlayout.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d4c3ea133850ee6b3add03d157c7ab78ea74da9a
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Tue Mar 15 23:38:33 2016 +0100

    fix windows build
    
    34a7b51ea482d4487d4fb8e61cde18aa1ff9b8ff (for 5-1) auto → size_t made
    32bit happy, but win64bit still failed with:
    error C2784: ´_Ty std::min(std::initializer_list<_Elem>,_Pr)´ : could
    not deduce template argument for ´std::initializer_list<_Elem>´ from
    ´__int64´
    
    (cherry picked from commit 53f645a9c959d93bde9230862c415c4ab2e3817b)
    
    Change-Id: Ib44840f692f1bcdea90decfe443c6eb72806002a
    Reviewed-on: https://gerrit.libreoffice.org/23288
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 9d0e9a4..2e83894 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -3907,8 +3907,8 @@ bool D2DWriteTextOutRenderer::DrawGlyphs(const Point & origin, uint16_t * pGid,
         DWRITE_GLYPH_OFFSET glyphOffsets[MAX_GLYPHS] = { { 0.0f, 0.0f }, };
 
         mpRT->BeginDraw();
-        for (size_t nGlyphs = std::min(pGidEnd - pGid, MAX_GLYPHS); pGid != pGidEnd;
-                    pGid += nGlyphs, nGlyphs = std::min(pGidEnd - pGid, MAX_GLYPHS))
+        for (size_t nGlyphs = std::min(static_cast<int>(pGidEnd - pGid), MAX_GLYPHS); pGid != pGidEnd;
+                    pGid += nGlyphs, nGlyphs = std::min(static_cast<int>(pGidEnd - pGid), MAX_GLYPHS))
         {
             std::copy(pGid, pGidEnd, glyphIndices);
             std::copy_n(pAdvances, nGlyphs, glyphAdvances);


More information about the Libreoffice-commits mailing list