diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-10-12 19:55:03 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-10-18 14:13:28 +0200 |
commit | d39f1da6e384b9540d2d163d7a7a84371e231c11 (patch) | |
tree | 0318cdf42943d0176244735ebc22ff89519a4540 /src/testlib/qtestlog.cpp | |
parent | d1bf556e24bc71a71f08da8c2ce78e2b38a06852 (diff) |
Simplify a list-removal operation in QTestLog's handleIgnoredMessage()
When list->next is nullptr, setting ignoreResultList to list->next is
the same as setting it to nullptr.
Change-Id: If328ce31db4344cf0136b7a827be871eb89e35b5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/testlib/qtestlog.cpp')
-rw-r--r-- | src/testlib/qtestlog.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp index 44480cbc04..3ec695679c 100644 --- a/src/testlib/qtestlog.cpp +++ b/src/testlib/qtestlog.cpp @@ -164,10 +164,8 @@ namespace QTest { // remove the item from the list if (last) last->next = list->next; - else if (list->next) - ignoreResultList = list->next; else - ignoreResultList = nullptr; + ignoreResultList = list->next; delete list; return true; |