Changeset 135763 in webkit


Ignore:
Timestamp:
Nov 26, 2012 2:11:42 PM (11 years ago)
Author:
bfulgham@webkit.org
Message:

clipboardwin compile error for win64
https://bugs.webkit.org/show_bug.cgi?id=94124

Patch by Alex Christensen <alex.christensen@flexsim.com> on 2012-11-26
Reviewed by Brent Fulgham.

The clipboard utilities code uses std::min with one unsigned int parameter and one size_t parameter.
This causes a problem when compiling for 64-bit Windows because the two types are not the same size.
To resolve this issue, we specify the template type as the type the return value is being cast into

Fixed a few compile errors for Windows x64 by specifying template parameters.

  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::setFileDescriptorData): Specify the types for the std::min macro to avoid compiler errors
under 64-bit builds.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r135762 r135763  
     12012-11-26  Alex Christensen  <alex.christensen@flexsim.com>
     2
     3        clipboardwin compile error for win64
     4        https://bugs.webkit.org/show_bug.cgi?id=94124
     5
     6        Reviewed by Brent Fulgham.
     7
     8        The clipboard utilities code uses std::min with one unsigned int parameter and one size_t parameter.
     9        This causes a problem when compiling for 64-bit Windows because the two types are not the same size.
     10        To resolve this issue, we specify the template type as the type the return value is being cast into
     11
     12        Fixed a few compile errors for Windows x64 by specifying template parameters.
     13
     14        * platform/win/ClipboardUtilitiesWin.cpp:
     15        (WebCore::setFileDescriptorData): Specify the types for the std::min macro to avoid compiler errors
     16        under 64-bit builds.
     17
    1182012-11-26  Arnaud Renevier  <a.renevier@sisa.samsung.com>
    219
  • trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp

    r130612 r135763  
    434434    fgd->fgd[0].nFileSizeLow = size;
    435435
    436     int maxSize = std::min(pathname.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
     436    int maxSize = std::min<int>(pathname.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
    437437    CopyMemory(fgd->fgd[0].cFileName, pathname.charactersWithNullTermination(), maxSize * sizeof(UChar));
    438438    GlobalUnlock(medium.hGlobal);
Note: See TracChangeset for help on using the changeset viewer.