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>
This commit is contained in:
parent
d1bf556e24
commit
d39f1da6e3
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user