mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-27 00:05:34 +01:00
UICommon/GameFile: Remove unnecessary value() calls in DownloadDefaultCover()
We already check ahead of time if the optional contains a value within it before accessing it, so we don't need to use the throwing value() accessor. We can just directly use operator->
This commit is contained in:
parent
ab0892e5a5
commit
80786cd295
@ -258,14 +258,13 @@ void GameFile::DownloadDefaultCover()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Common::HttpRequest request;
|
Common::HttpRequest request;
|
||||||
auto response =
|
const auto response =
|
||||||
request.Get(StringFromFormat(COVER_URL, region_code.c_str(), m_gametdb_id.c_str()));
|
request.Get(StringFromFormat(COVER_URL, region_code.c_str(), m_gametdb_id.c_str()));
|
||||||
|
|
||||||
if (response)
|
if (!response)
|
||||||
{
|
return;
|
||||||
File::WriteStringToFile(std::string(response.value().begin(), response.value().end()),
|
|
||||||
png_path);
|
File::WriteStringToFile(std::string(response->begin(), response->end()), png_path);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameFile::DefaultCoverChanged()
|
bool GameFile::DefaultCoverChanged()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user