diff --git a/src/base/bittorrent/sessionimpl.cpp b/src/base/bittorrent/sessionimpl.cpp index 74c638c34..6b17cffc7 100644 --- a/src/base/bittorrent/sessionimpl.cpp +++ b/src/base/bittorrent/sessionimpl.cpp @@ -3003,7 +3003,7 @@ void SessionImpl::invokeAsync(std::function func) bool SessionImpl::downloadMetadata(const TorrentDescriptor &torrentDescr) { Q_ASSERT(!torrentDescr.info().has_value()); - if (Q_UNLIKELY(torrentDescr.info().has_value())) + if (torrentDescr.info().has_value()) [[unlikely]] return false; const InfoHash infoHash = torrentDescr.infoHash(); diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index 947a91321..36b1eda3f 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -692,7 +692,7 @@ void AddNewTorrentDialog::contentLayoutChanged() void AddNewTorrentDialog::saveTorrentFile() { Q_ASSERT(hasMetadata()); - if (Q_UNLIKELY(!hasMetadata())) + if (!hasMetadata()) [[unlikely]] return; const auto torrentInfo = *m_torrentDescr.info();