2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 03:47:43 +00:00

General: Mark a handful of deduced const variables as const explicitly

Same behavior, but makes it explicit to the reader that these are const.

Prevents cases where the reader might assume that just because the
variable isn't const qualified that it must be mutable, when it actually
isn't.
This commit is contained in:
Lioncash
2020-05-08 18:41:27 -04:00
parent 6658be66c2
commit 5d209c8dc8
12 changed files with 47 additions and 35 deletions

View File

@@ -132,10 +132,10 @@ void CResLoader::GetTagListForFile(const char* pakName, std::vector<SObjectTag>&
bool CResLoader::_GetTagListForFile(std::vector<SObjectTag>& out, const std::string& path,
const std::unique_ptr<CPakFile>& file) const {
if (CStringExtras::CompareCaseInsensitive(file->GetPath(), path)) {
auto& depList = file->GetDepList();
const auto& depList = file->GetDepList();
out.reserve(depList.size());
for (const auto& dep : depList) {
auto resInfo = file->GetResInfo(dep);
const auto* const resInfo = file->GetResInfo(dep);
out.emplace_back(resInfo->GetType(), dep);
}
return true;