Add missing includes and use const where applicable

This commit is contained in:
Zach Hilman
2018-07-29 19:00:09 -04:00
parent 150527ec19
commit 03149d3e4a
11 changed files with 40 additions and 24 deletions

View File

@ -93,8 +93,9 @@ VirtualDir XCI::GetLogoPartition() const {
}
std::shared_ptr<NCA> XCI::GetNCAByType(NCAContentType type) const {
auto iter = std::find_if(ncas.begin(), ncas.end(),
[type](std::shared_ptr<NCA> nca) { return nca->GetType() == type; });
const auto iter =
std::find_if(ncas.begin(), ncas.end(),
[type](const std::shared_ptr<NCA>& nca) { return nca->GetType() == type; });
return iter == ncas.end() ? nullptr : *iter;
}