Fixing 'argument': conversion from 'size_t' to 'int', possible loss of data

assert no longer required because size_t is unsigned anyway
This commit is contained in:
Rob Emery 2024-10-09 22:18:15 +01:00
parent fd304d9edb
commit e3af5e6312
2 changed files with 2 additions and 3 deletions

View file

@ -63,9 +63,8 @@ void RequestConversationWorker::handleRequestConversation()
Q_EMIT finished();
}
size_t RequestConversationWorker::replyForConversation(const QList<ConversationMessage> &conversation, int start, size_t howMany)
size_t RequestConversationWorker::replyForConversation(const QList<ConversationMessage> &conversation, size_t start, size_t howMany)
{
Q_ASSERT(start >= 0);
// Messages are sorted in ascending order of keys, meaning the front of the list has the oldest
// messages (smallest timestamp number)
// Therefore, return the end of the list first (most recent messages)

View file

@ -58,5 +58,5 @@ private:
* @param howMany Maximum number of messages to return
* $return Number of messages processed
*/
size_t replyForConversation(const QList<ConversationMessage> &conversation, int start, size_t howMany);
size_t replyForConversation(const QList<ConversationMessage> &conversation, size_t start, size_t howMany);
};