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;
|
||||
auto response =
|
||||
const auto response =
|
||||
request.Get(StringFromFormat(COVER_URL, region_code.c_str(), m_gametdb_id.c_str()));
|
||||
|
||||
if (response)
|
||||
{
|
||||
File::WriteStringToFile(std::string(response.value().begin(), response.value().end()),
|
||||
png_path);
|
||||
}
|
||||
if (!response)
|
||||
return;
|
||||
|
||||
File::WriteStringToFile(std::string(response->begin(), response->end()), png_path);
|
||||
}
|
||||
|
||||
bool GameFile::DefaultCoverChanged()
|
||||
|
|
Loading…
Reference in New Issue