mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Avoid shadowing function parameter
The function already has a parameter named `result`. Also remove a duplicate variable since it already has a pref pointer at the start of the function. PR #21571.
This commit is contained in:
parent
c4eeb4a14a
commit
ac646f47a2
2 changed files with 3 additions and 4 deletions
|
@ -293,7 +293,6 @@ BitTorrent::LoadResumeDataResult BitTorrent::BencodeResumeDataStorage::loadTorre
|
||||||
|
|
||||||
if (!metadata.isEmpty())
|
if (!metadata.isEmpty())
|
||||||
{
|
{
|
||||||
const auto *pref = Preferences::instance();
|
|
||||||
const lt::bdecode_node torentInfoRoot = lt::bdecode(metadata, ec
|
const lt::bdecode_node torentInfoRoot = lt::bdecode(metadata, ec
|
||||||
, nullptr, pref->getBdecodeDepthLimit(), pref->getBdecodeTokenLimit());
|
, nullptr, pref->getBdecodeDepthLimit(), pref->getBdecodeTokenLimit());
|
||||||
if (ec)
|
if (ec)
|
||||||
|
|
|
@ -456,15 +456,15 @@ void GeoIPManager::downloadFinished(const DownloadResult &result)
|
||||||
Utils::Fs::mkpath(targetPath);
|
Utils::Fs::mkpath(targetPath);
|
||||||
|
|
||||||
const auto path = targetPath / Path(GEODB_FILENAME);
|
const auto path = targetPath / Path(GEODB_FILENAME);
|
||||||
const nonstd::expected<void, QString> result = Utils::IO::saveToFile(path, data);
|
const nonstd::expected<void, QString> saveResult = Utils::IO::saveToFile(path, data);
|
||||||
if (result)
|
if (saveResult)
|
||||||
{
|
{
|
||||||
LogMsg(tr("Successfully updated IP geolocation database."), Log::INFO);
|
LogMsg(tr("Successfully updated IP geolocation database."), Log::INFO);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogMsg(tr("Couldn't save downloaded IP geolocation database file. Reason: %1")
|
LogMsg(tr("Couldn't save downloaded IP geolocation database file. Reason: %1")
|
||||||
.arg(result.error()), Log::WARNING);
|
.arg(saveResult.error()), Log::WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue