WTF::binarySearchImpl() should compile with -Wshorten-64-to-32
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2013 15:25:23 +0000 (15:25 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2013 15:25:23 +0000 (15:25 +0000)
commit6adf6dee6590b80c85a087b95c2c3c4f638a2f79
tree36cc20780bd6ab826b5ebca9951a0e9affce4e03
parentc85251d96608042cad6373f7143abd1e60e0bc6f
WTF::binarySearchImpl() should compile with -Wshorten-64-to-32
<http://webkit.org/b/113170>

Reviewed by Dan Bernstein.

Fixes the following build failure:

    /usr/local/include/wtf/StdLibExtras.h:190:30: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
            int pos = (size - 1) >> 1;
                ~~~   ~~~~~~~~~~~^~~~
    1 error generated.

* wtf/StdLibExtras.h:
(WTF::binarySearchImpl): Switch type from int to size_t.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/StdLibExtras.h