From 1147b6ad90f2409a22bf7a356a7929a183b8e472 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Wed, 6 Mar 2019 23:47:49 +0100 Subject: Use auto when declaring iterators modernize-use-auto Change-Id: I13e1d76493f860e2d38202c34c2ee29e88155487 Reviewed-by: Denis Shienkov Reviewed-by: Christian Kandeler --- tests/auto/tools/tst_tools.cpp | 48 +++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'tests/auto/tools') diff --git a/tests/auto/tools/tst_tools.cpp b/tests/auto/tools/tst_tools.cpp index da40a2dc6..a6c699232 100644 --- a/tests/auto/tools/tst_tools.cpp +++ b/tests/auto/tools/tst_tools.cpp @@ -679,10 +679,10 @@ void TestTools::set_begin() Set set2 = set1; { - Set::const_iterator i = set1.constBegin(); - Set::const_iterator j = set1.cbegin(); - Set::const_iterator k = set2.constBegin(); - Set::const_iterator ell = set2.cbegin(); + const auto i = set1.constBegin(); + const auto j = set1.cbegin(); + const auto k = set2.constBegin(); + const auto ell = set2.cbegin(); QVERIFY(i == j); QVERIFY(k == ell); @@ -691,10 +691,10 @@ void TestTools::set_begin() set1.insert(44); { - Set::const_iterator i = set1.constBegin(); - Set::const_iterator j = set1.cbegin(); - Set::const_iterator k = set2.constBegin(); - Set::const_iterator ell = set2.cbegin(); + const auto i = set1.constBegin(); + const auto j = set1.cbegin(); + const auto k = set2.constBegin(); + const auto ell = set2.cbegin(); QVERIFY(i == j); QVERIFY(k == ell); @@ -703,10 +703,10 @@ void TestTools::set_begin() set2 = set1; { - Set::const_iterator i = set1.constBegin(); - Set::const_iterator j = set1.cbegin(); - Set::const_iterator k = set2.constBegin(); - Set::const_iterator ell = set2.cbegin(); + const auto i = set1.constBegin(); + const auto j = set1.cbegin(); + const auto k = set2.constBegin(); + const auto ell = set2.cbegin(); QVERIFY(i == j); QVERIFY(k == ell); @@ -719,10 +719,10 @@ void TestTools::set_end() Set set2 = set1; { - Set::const_iterator i = set1.constEnd(); - Set::const_iterator j = set1.cend(); - Set::const_iterator k = set2.constEnd(); - Set::const_iterator ell = set2.cend(); + const auto i = set1.constEnd(); + const auto j = set1.cend(); + const auto k = set2.constEnd(); + const auto ell = set2.cend(); QVERIFY(i == j); QVERIFY(k == ell); @@ -734,10 +734,10 @@ void TestTools::set_end() set1.insert(44); { - Set::const_iterator i = set1.constEnd(); - Set::const_iterator j = set1.cend(); - Set::const_iterator k = set2.constEnd(); - Set::const_iterator ell = set2.cend(); + const auto i = set1.constEnd(); + const auto j = set1.cend(); + const auto k = set2.constEnd(); + const auto ell = set2.cend(); QVERIFY(i == j); QVERIFY(k == ell); @@ -749,10 +749,10 @@ void TestTools::set_end() set2 = set1; { - Set::const_iterator i = set1.constEnd(); - Set::const_iterator j = set1.cend(); - Set::const_iterator k = set2.constEnd(); - Set::const_iterator ell = set2.cend(); + const auto i = set1.constEnd(); + const auto j = set1.cend(); + const auto k = set2.constEnd(); + const auto ell = set2.cend(); QVERIFY(i == j); QVERIFY(k == ell); -- cgit v1.2.3