diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-08-10 05:10:32 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-12 04:50:48 +0200 |
commit | 167bfddafadb843236c0fa683cf97eaffaa5ea1a (patch) | |
tree | bd67e895222feb751c4d4625143b9d352eb62847 /src/core/file_sys/nca_metadata.cpp | |
parent | qt: Add 'Install to NAND' option to menu (diff) | |
download | yuzu-167bfddafadb843236c0fa683cf97eaffaa5ea1a.tar yuzu-167bfddafadb843236c0fa683cf97eaffaa5ea1a.tar.gz yuzu-167bfddafadb843236c0fa683cf97eaffaa5ea1a.tar.bz2 yuzu-167bfddafadb843236c0fa683cf97eaffaa5ea1a.tar.lz yuzu-167bfddafadb843236c0fa683cf97eaffaa5ea1a.tar.xz yuzu-167bfddafadb843236c0fa683cf97eaffaa5ea1a.tar.zst yuzu-167bfddafadb843236c0fa683cf97eaffaa5ea1a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/nca_metadata.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/file_sys/nca_metadata.cpp b/src/core/file_sys/nca_metadata.cpp index fa06897b7..118a0c287 100644 --- a/src/core/file_sys/nca_metadata.cpp +++ b/src/core/file_sys/nca_metadata.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <cstring> #include "common/common_funcs.h" #include "common/swap.h" #include "content_archive.h" @@ -67,9 +68,10 @@ const std::vector<MetaRecord>& CNMT::GetMetaRecords() const { bool CNMT::UnionRecords(const CNMT& other) { bool change = false; for (const auto& rec : other.content_records) { - const auto iter = std::find_if( - content_records.begin(), content_records.end(), - [rec](const ContentRecord& r) { return r.nca_id == rec.nca_id && r.type == rec.type; }); + const auto iter = std::find_if(content_records.begin(), content_records.end(), + [&rec](const ContentRecord& r) { + return r.nca_id == rec.nca_id && r.type == rec.type; + }); if (iter == content_records.end()) { content_records.emplace_back(rec); ++header->number_content_entries; @@ -78,7 +80,7 @@ bool CNMT::UnionRecords(const CNMT& other) { } for (const auto& rec : other.meta_records) { const auto iter = - std::find_if(meta_records.begin(), meta_records.end(), [rec](const MetaRecord& r) { + std::find_if(meta_records.begin(), meta_records.end(), [&rec](const MetaRecord& r) { return r.title_id == rec.title_id && r.title_version == rec.title_version && r.type == rec.type; }); |