mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Avoid unnecessary memory allocation/relocation
This commit is contained in:
parent
1f2a6455b6
commit
03d3552ee0
3 changed files with 19 additions and 4 deletions
|
@ -191,7 +191,7 @@ void Smtp::readyRead()
|
|||
const int pos = m_buffer.indexOf("\r\n");
|
||||
if (pos < 0) return; // Loop exit condition
|
||||
const QByteArray line = m_buffer.left(pos);
|
||||
m_buffer = m_buffer.mid(pos + 2);
|
||||
m_buffer.remove(0, (pos + 2));
|
||||
qDebug() << "Response line:" << line;
|
||||
// Extract response code
|
||||
const QByteArray code = line.left(3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue