Use std::exchange in Qt::endPropertyUpdateGroup()
Easier to read, saying in one line that for which the old code needed three. Task-number: QTBUG-110710 Change-Id: Ie2a1d11aefe0bdf5f4db0694832fce669de564fc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>bb10
parent
d257a56c93
commit
e8322a4cc0
|
|
@ -233,9 +233,7 @@ void Qt::endPropertyUpdateGroup()
|
|||
while (data) {
|
||||
for (qsizetype i = 0; i < data->used; ++i)
|
||||
data->notify(i);
|
||||
auto *next = data->next;
|
||||
delete data;
|
||||
data = next;
|
||||
delete std::exchange(data, data->next);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue