mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(offlinemsg): replace qSort with std::sort
This commit is contained in:
parent
8373e3abf3
commit
24811d1042
|
@ -101,7 +101,7 @@ void OfflineMsgEngine::deliverOfflineMsgs()
|
||||||
|
|
||||||
QVector<OfflineMessage> messages = sentMessages.values().toVector() + unsentMessages;
|
QVector<OfflineMessage> messages = sentMessages.values().toVector() + unsentMessages;
|
||||||
// order messages by authorship time to resend in same order as they were written
|
// order messages by authorship time to resend in same order as they were written
|
||||||
qSort(messages.begin(), messages.end(), [](const OfflineMessage& lhs, const OfflineMessage& rhs) {
|
std::sort(messages.begin(), messages.end(), [](const OfflineMessage& lhs, const OfflineMessage& rhs) {
|
||||||
return lhs.authorshipTime < rhs.authorshipTime;
|
return lhs.authorshipTime < rhs.authorshipTime;
|
||||||
});
|
});
|
||||||
removeAllMessages();
|
removeAllMessages();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user