Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added template parameters to std::min to fix compile errors in Visual…
… Studio x64.

https://bugs.webkit.org/show_bug.cgi?id=118204

Reviewed by Geoffrey Garen.

* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject): Added <unsigned> to std::min.
(WebCore::createGlobalImageFileDescriptor): Added <int> to std::min.


Canonical link: https://commits.webkit.org/136246@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
achristensen07 committed Jun 28, 2013
1 parent 7680412 commit fbbc89b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,14 @@
2013-06-28 Alex Christensen <achristensen@apple.com>

Added template parameters to std::min to fix compile errors in Visual Studio x64.
https://bugs.webkit.org/show_bug.cgi?id=118204

Reviewed by Geoffrey Garen.

* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject): Added <unsigned> to std::min.
(WebCore::createGlobalImageFileDescriptor): Added <int> to std::min.

2013-06-28 Alex Christensen <achristensen@apple.com>

Added WebGL files to Windows build.
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/platform/win/PasteboardWin.cpp
Expand Up @@ -677,7 +677,7 @@ void Pasteboard::writeURLToDataObject(const KURL& kurl, const String& titleStr,
fgd->fgd[0].dwFlags = FD_FILESIZE;
fgd->fgd[0].nFileSizeLow = content.length();

unsigned maxSize = std::min(fsPath.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
unsigned maxSize = std::min<unsigned>(fsPath.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
CopyMemory(fgd->fgd[0].cFileName, fsPath.characters(), maxSize * sizeof(UChar));
GlobalUnlock(urlFileDescriptor);

Expand Down Expand Up @@ -929,7 +929,7 @@ static HGLOBAL createGlobalImageFileDescriptor(const String& url, const String&
return 0;
}

int maxSize = std::min(fsPath.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
int maxSize = std::min<int>(fsPath.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
CopyMemory(fgd->fgd[0].cFileName, (LPCWSTR)fsPath.characters(), maxSize * sizeof(UChar));
GlobalUnlock(memObj);

Expand Down

0 comments on commit fbbc89b

Please sign in to comment.