Silence 'narrowing conversion' warning in test

Seen with gcc 4.6:

tst_qarraydata.cpp: In member function 'void tst_QArrayData::grow()':
tst_qarraydata.cpp:1445:29: error: narrowing conversion of 'i' from
'size_t {aka long unsigned int}' to 'int' inside { } [-fpermissive]

Change-Id: Iad55659554b64ee34655640d606153f058a8cd05
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
João Abecasis 2012-03-08 11:46:08 +01:00 committed by Qt by Nokia
parent 7786d15e93
commit 91248b0f3b
1 changed files with 1 additions and 1 deletions

View File

@ -1442,7 +1442,7 @@ void tst_QArrayData::grow()
size_t previousCapacity = vector.capacity();
size_t allocations = 0;
for (size_t i = 1; i <= (1 << 20); ++i) {
int source[1] = { i };
int source[1] = { int(i) };
vector.append(source, source + 1);
QCOMPARE(vector.size(), i);
if (vector.capacity() != previousCapacity) {