diff options
author | Ivan Komissarov <ABBAPOH@gmail.com> | 2019-03-06 23:47:49 +0100 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2019-03-07 12:39:23 +0000 |
commit | 1147b6ad90f2409a22bf7a356a7929a183b8e472 (patch) | |
tree | a7d4fcc69d053b104d1468f0fa53ea86c07f14cb /tests/auto/tools | |
parent | 936eee744db9b2fd1b9b66d168d80a113002aad2 (diff) |
Use auto when declaring iterators
modernize-use-auto
Change-Id: I13e1d76493f860e2d38202c34c2ee29e88155487
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r-- | tests/auto/tools/tst_tools.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
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<int> set2 = set1; { - Set<int>::const_iterator i = set1.constBegin(); - Set<int>::const_iterator j = set1.cbegin(); - Set<int>::const_iterator k = set2.constBegin(); - Set<int>::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<int>::const_iterator i = set1.constBegin(); - Set<int>::const_iterator j = set1.cbegin(); - Set<int>::const_iterator k = set2.constBegin(); - Set<int>::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<int>::const_iterator i = set1.constBegin(); - Set<int>::const_iterator j = set1.cbegin(); - Set<int>::const_iterator k = set2.constBegin(); - Set<int>::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<int> set2 = set1; { - Set<int>::const_iterator i = set1.constEnd(); - Set<int>::const_iterator j = set1.cend(); - Set<int>::const_iterator k = set2.constEnd(); - Set<int>::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<int>::const_iterator i = set1.constEnd(); - Set<int>::const_iterator j = set1.cend(); - Set<int>::const_iterator k = set2.constEnd(); - Set<int>::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<int>::const_iterator i = set1.constEnd(); - Set<int>::const_iterator j = set1.cend(); - Set<int>::const_iterator k = set2.constEnd(); - Set<int>::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); |