From 167bfddafadb843236c0fa683cf97eaffaa5ea1a Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Thu, 9 Aug 2018 23:10:32 -0400 Subject: file_sys: Comply to style guidelines --- src/core/file_sys/nca_metadata.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/core/file_sys/nca_metadata.cpp') 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 #include "common/common_funcs.h" #include "common/swap.h" #include "content_archive.h" @@ -67,9 +68,10 @@ const std::vector& 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; }); -- cgit v1.2.3