mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-27 10:29:07 +00:00
Simplify std::find_if with Common::Contains
This commit is contained in:
parent
110d32729e
commit
d92c68e1de
5 changed files with 25 additions and 49 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include "Common/Align.h"
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Contains.h"
|
||||
#include "Common/EnumUtils.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/HttpRequest.h"
|
||||
|
|
@ -590,10 +591,8 @@ UpdateResult OnlineSystemUpdater::InstallTitleFromNUS(const std::string& prefix_
|
|||
const UpdateResult import_result = [&]() {
|
||||
for (const IOS::ES::Content& content : tmd.first.GetContents())
|
||||
{
|
||||
const bool is_already_installed = std::find_if(stored_contents.begin(), stored_contents.end(),
|
||||
[&content](const auto& stored_content) {
|
||||
return stored_content.id == content.id;
|
||||
}) != stored_contents.end();
|
||||
const bool is_already_installed =
|
||||
Common::Contains(stored_contents, content.id, &IOS::ES::Content::id);
|
||||
|
||||
// Do skip what is already installed on the NAND.
|
||||
if (is_already_installed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue