From c03803b9b37572b79a73dc33eb9f1efc9254d9da Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 24 Oct 2018 16:07:24 +0200 Subject: Clean up some array dereferncing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use array dereferencing notation ptr[expr] rather than the more verbose and less readable *(ptr + expr). Change-Id: Ie98986e7f622aa1a94f3f14bc362ed65767f9d92 Reviewed-by: Jędrzej Nowacki --- src/testlib/qtestcase.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/testlib') diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index f21c2c9fde..59ea4c194c 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -811,9 +811,9 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool // we load the QML files. So just store the data for now. int colon = -1; int offset; - for (offset = 0; *(argv[i]+offset); ++offset) { - if (*(argv[i]+offset) == ':') { - if (*(argv[i]+offset+1) == ':') { + for (offset = 0; argv[i][offset]; ++offset) { + if (argv[i][offset] == ':') { + if (argv[i][offset + 1] == ':') { // "::" is used as a test name separator. // e.g. "ClickTests::test_click:row1". ++offset; -- cgit v1.2.3