summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qarraydata.cpp4
-rw-r--r--src/corelib/tools/qarraydataops.h4
-rw-r--r--src/corelib/tools/qarraydatapointer.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp
index 00f6dfe6ef..497eae1f7f 100644
--- a/src/corelib/tools/qarraydata.cpp
+++ b/src/corelib/tools/qarraydata.cpp
@@ -233,7 +233,7 @@ void *QArrayData::allocate(QArrayData **dptr, size_t objectSize, size_t alignmen
// find where offset should point to so that data() is aligned to alignment bytes
data = (quintptr(header) + sizeof(QArrayData) + alignment - 1)
& ~(alignment - 1);
- header->alloc = capacity;
+ header->alloc = uint(capacity);
}
*dptr = header;
@@ -262,7 +262,7 @@ QArrayData::reallocateUnaligned(QArrayData *data, void *dataPointer,
options |= AllocatedDataType | MutableData;
QArrayData *header = reallocateData(data, allocSize, options);
if (header) {
- header->alloc = capacity;
+ header->alloc = uint(capacity);
dataPointer = reinterpret_cast<char *>(header) + offset;
}
return qMakePair(static_cast<QArrayData *>(header), dataPointer);
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index 6b110c5143..0d2be5d51c 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -158,7 +158,7 @@ struct QPodArrayOps
::memmove(static_cast<void *>(where + n), static_cast<void *>(where),
(static_cast<const T*>(this->end()) - where) * sizeof(T));
- this->size += n; // PODs can't throw on copy
+ this->size += int(n); // PODs can't throw on copy
while (n--)
*where++ = t;
}
@@ -655,7 +655,7 @@ struct QMovableArrayOps
copier.copy(n, t);
displace.commit();
- this->size += n;
+ this->size += int(n);
}
// use moving insert
diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h
index 7bba7241e9..a17cf4a101 100644
--- a/src/corelib/tools/qarraydatapointer.h
+++ b/src/corelib/tools/qarraydatapointer.h
@@ -71,12 +71,12 @@ public:
}
QArrayDataPointer(Data *header, T *adata, size_t n = 0) noexcept
- : d(header), ptr(adata), size(n)
+ : d(header), ptr(adata), size(int(n))
{
}
explicit QArrayDataPointer(QPair<QTypedArrayData<T> *, T *> adata, size_t n = 0)
- : d(adata.first), ptr(adata.second), size(n)
+ : d(adata.first), ptr(adata.second), size(int(n))
{
Q_CHECK_PTR(d);
}