From be3d4ebcbfd36c15c3fe53a8377ba93cb763e30a Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 18 Mar 2015 09:27:15 +0100 Subject: QVarLengthArray: Do not require operator!= for element comparison The documentation claims that operator== is needed, not operator!=. While at it, we can also replace the loop with std::equal, which might even allow STL implementations to choose a hand-optimized version of the algorithm for C++ builtin types ... Change-Id: I988b326d6af3b767526952e303468e18ff6594f9 Reviewed-by: Marc Mutz --- src/corelib/tools/qvarlengtharray.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/corelib') 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 &l, const QVarLengthArray -- cgit v1.2.3