mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 08:43:08 -07:00
Reduce padding in structure
Log::Msg originally takes 32 bytes, now shrinks to 24 bytes. Log::Peer originally takes 40 bytes, now shrinks to 32 bytes.
This commit is contained in:
parent
2681093d27
commit
648d44d9b9
2 changed files with 4 additions and 4 deletions
|
@ -72,7 +72,7 @@ void Logger::freeInstance()
|
|||
void Logger::addMessage(const QString &message, const Log::MsgType &type)
|
||||
{
|
||||
QWriteLocker locker(&m_lock);
|
||||
const Log::Msg msg = {m_msgCounter++, QDateTime::currentMSecsSinceEpoch(), type, message};
|
||||
const Log::Msg msg = {m_msgCounter++, type, QDateTime::currentMSecsSinceEpoch(), message};
|
||||
m_messages.push_back(msg);
|
||||
locker.unlock();
|
||||
|
||||
|
@ -82,7 +82,7 @@ void Logger::addMessage(const QString &message, const Log::MsgType &type)
|
|||
void Logger::addPeer(const QString &ip, const bool blocked, const QString &reason)
|
||||
{
|
||||
QWriteLocker locker(&m_lock);
|
||||
const Log::Peer msg = {m_peerCounter++, QDateTime::currentMSecsSinceEpoch(), ip, blocked, reason};
|
||||
const Log::Peer msg = {m_peerCounter++, blocked, QDateTime::currentMSecsSinceEpoch(), ip, reason};
|
||||
m_peers.push_back(msg);
|
||||
locker.unlock();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue