From a6d339fd18cb4f45ddc8f5573c0d420f767729be Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 6 Mar 2013 15:52:04 +0100 Subject: Fix loop condition in tst_qhash (CLANG). Change-Id: Ic841abdf45cd2543500b3dc4030bea5f6fd88174 Reviewed-by: Mitch Curtis --- tests/auto/corelib/tools/qhash/tst_qhash.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/tools') diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp index 903a4e1012..1cbf181286 100644 --- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp +++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp @@ -845,7 +845,7 @@ void tst_QHash::iterators() //STL-Style iterators QHash::iterator stlIt = hash.begin(); - for(stlIt = hash.begin(), i = 1; stlIt != hash.end(), i < 100; ++stlIt, ++i) { + for (stlIt = hash.begin(), i = 1; stlIt != hash.end() && i < 100; ++stlIt, ++i) { testMap.insert(i,stlIt.value()); //QVERIFY(stlIt.value() == hash.value( } @@ -870,7 +870,7 @@ void tst_QHash::iterators() //STL-Style const-iterators QHash::const_iterator cstlIt = hash.constBegin(); - for(cstlIt = hash.constBegin(), i = 1; cstlIt != hash.constEnd(), i < 100; ++cstlIt, ++i) { + for (cstlIt = hash.constBegin(), i = 1; cstlIt != hash.constEnd() && i < 100; ++cstlIt, ++i) { testMap.insert(i,cstlIt.value()); //QVERIFY(stlIt.value() == hash.value( } -- cgit v1.2.3