summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qarraydataops.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index 47df15ddaa..6bb8280ca8 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -319,7 +319,8 @@ struct QMovableArrayOps
, end(finish)
, displace(diff)
{
- ::memmove(begin + displace, begin, (end - begin) * sizeof(T));
+ ::memmove(static_cast<void *>(begin + displace), static_cast<void *>(begin),
+ (end - begin) * sizeof(T));
}
void commit() { displace = 0; }
@@ -327,7 +328,8 @@ struct QMovableArrayOps
~ReversibleDisplace()
{
if (displace)
- ::memmove(begin, begin + displace, (end - begin) * sizeof(T));
+ ::memmove(static_cast<void *>(begin), static_cast<void *>(begin + displace),
+ (end - begin) * sizeof(T));
}
T *const begin;
@@ -384,7 +386,7 @@ struct QMovableArrayOps
~Mover()
{
- ::memmove(destination, source, n * sizeof(T));
+ ::memmove(static_cast<void *>(destination), static_cast<const void *>(source), n * sizeof(T));
size -= (source - destination);
}