<http://webkit.org/b/120983>
Reviewed by Dan Bernstein.
Fixes the following build failure:
WebKitBuild/Debug/usr/local/include/wtf/StdLibExtras.h:266:23: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
for (unsigned i = size; i-- > index + 1;)
~ ^~~~
* wtf/StdLibExtras.h:
(WTF::insertIntoBoundedVector): Use size_t instead of unsigned
as for loop index variable.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155280
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-09-07 David Kilzer <ddkilzer@apple.com>
+
+ gtest fails to build due to integer type mismatch in WTF::insertIntoBoundedVector()
+ <http://webkit.org/b/120983>
+
+ Reviewed by Dan Bernstein.
+
+ Fixes the following build failure:
+
+ WebKitBuild/Debug/usr/local/include/wtf/StdLibExtras.h:266:23: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
+ for (unsigned i = size; i-- > index + 1;)
+ ~ ^~~~
+
+ * wtf/StdLibExtras.h:
+ (WTF::insertIntoBoundedVector): Use size_t instead of unsigned
+ as for loop index variable.
+
2013-09-07 Anders Carlsson <andersca@apple.com>
Remove NonCopyableSort.h from WTF
template<typename VectorType, typename ElementType>
inline void insertIntoBoundedVector(VectorType& vector, size_t size, const ElementType& element, size_t index)
{
- for (unsigned i = size; i-- > index + 1;)
+ for (size_t i = size; i-- > index + 1;)
vector[i] = vector[i - 1];
vector[index] = element;
}