Reduce padding in class

TorrentHandleImpl size is reduced from 768 bytes to 736 bytes.
CreateTorrentParams size didn't change.
Size numbers are from x64.
This commit is contained in:
Chocobo1 2020-04-19 11:14:37 +08:00
commit 1b80890696
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
2 changed files with 16 additions and 15 deletions

View file

@ -132,6 +132,8 @@ CreateTorrentParams::CreateTorrentParams(const AddTorrentParams &params)
, category(params.category)
, tags(params.tags)
, savePath(params.savePath)
, uploadLimit(params.uploadLimit)
, downloadLimit(params.downloadLimit)
, disableTempPath(params.disableTempPath)
, sequential(params.sequential)
, firstLastPiecePriority(params.firstLastPiecePriority)
@ -144,8 +146,6 @@ CreateTorrentParams::CreateTorrentParams(const AddTorrentParams &params)
, paused(params.addPaused == TriStateBool::Undefined
? Session::instance()->isAddTorrentPaused()
: params.addPaused == TriStateBool::True)
, uploadLimit(params.uploadLimit)
, downloadLimit(params.downloadLimit)
, filePriorities(params.filePriorities)
, ratioLimit(params.ignoreShareLimits ? TorrentHandleImpl::NO_RATIO_LIMIT : TorrentHandleImpl::USE_GLOBAL_RATIO)
, seedingTimeLimit(params.ignoreShareLimits ? TorrentHandleImpl::NO_SEEDING_TIME_LIMIT : TorrentHandleImpl::USE_GLOBAL_SEEDING_TIME)
@ -166,16 +166,16 @@ TorrentHandleImpl::TorrentHandleImpl(Session *session, const lt::torrent_handle
: QObject(session)
, m_session(session)
, m_nativeHandle(nativeHandle)
, m_useAutoTMM(params.savePath.isEmpty())
, m_name(params.name)
, m_savePath(Utils::Fs::toNativePath(params.savePath))
, m_category(params.category)
, m_tags(params.tags)
, m_hasSeedStatus(params.hasSeedStatus)
, m_ratioLimit(params.ratioLimit)
, m_seedingTimeLimit(params.seedingTimeLimit)
, m_hasSeedStatus(params.hasSeedStatus)
, m_tempPathDisabled(params.disableTempPath)
, m_hasRootFolder(params.hasRootFolder)
, m_useAutoTMM(params.savePath.isEmpty())
{
if (m_useAutoTMM)
m_savePath = Utils::Fs::toNativePath(m_session->categorySavePath(m_category));