diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qvarlengtharray.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index 32f621c809..95cd0447d8 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -468,11 +468,10 @@ bool operator==(const QVarLengthArray<T, Prealloc1> &l, const QVarLengthArray<T, { if (l.size() != r.size()) return false; - for (int i = 0; i < l.size(); i++) { - if (l.at(i) != r.at(i)) - return false; - } - return true; + const T *rb = r.begin(); + const T *b = l.begin(); + const T *e = l.end(); + return std::equal(b, e, rb); } template <typename T, int Prealloc1, int Prealloc2> |