summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-10-24 16:07:24 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-11-01 15:06:52 +0000
commitc03803b9b37572b79a73dc33eb9f1efc9254d9da (patch)
treee8e719561fe7956bc3e0a8e3c848552862ecbb26 /src/testlib
parent33d7f76f0e847d7e0fb00dd6056e7bba45b8b1e7 (diff)
Clean up some array dereferncing
Use array dereferencing notation ptr[expr] rather than the more verbose and less readable *(ptr + expr). Change-Id: Ie98986e7f622aa1a94f3f14bc362ed65767f9d92 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestcase.cpp6
1 files changed, 3 insertions, 3 deletions
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;