diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/tools/qarraydata.h | 4 | ||||
| -rw-r--r-- | src/corelib/tools/qarraydataops.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h index 7df4694bcd9..ffb2b8765e3 100644 --- a/src/corelib/tools/qarraydata.h +++ b/src/corelib/tools/qarraydata.h @@ -135,7 +135,7 @@ struct QTypedArrayData public: T *i; typedef std::random_access_iterator_tag iterator_category; - typedef qptrdiff difference_type; + typedef int difference_type; typedef T value_type; typedef T *pointer; typedef T &reference; @@ -169,7 +169,7 @@ struct QTypedArrayData public: const T *i; typedef std::random_access_iterator_tag iterator_category; - typedef qptrdiff difference_type; + typedef int difference_type; typedef T value_type; typedef const T *pointer; typedef const T &reference; diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h index c8a08254808..b94c6b50ea5 100644 --- a/src/corelib/tools/qarraydataops.h +++ b/src/corelib/tools/qarraydataops.h @@ -122,7 +122,7 @@ struct QPodArrayOps Q_ASSERT(b >= this->begin() && b < this->end()); Q_ASSERT(e > this->begin() && e < this->end()); - ::memmove(b, e, (this->end() - e) * sizeof(T)); + ::memmove(b, e, (static_cast<T *>(this->end()) - e) * sizeof(T)); this->size -= (e - b); } }; |
