Skip to content
Browse files

UICommon/GameFile: Remove unnecessary value() calls in DownloadDefaul…


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->
  • Loading branch information...
lioncash committed May 28, 2019
1 parent ab0892e commit 80786cd295426244068718d6553c5cb59abcb81f
Showing with 5 additions and 6 deletions.
  1. +5 −6 Source/Core/UICommon/GameFile.cpp
@@ -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()),
if (!response)

File::WriteStringToFile(std::string(response->begin(), response->end()), png_path);

bool GameFile::DefaultCoverChanged()

0 comments on commit 80786cd

Please sign in to comment.
You can’t perform that action at this time.