mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-07 18:59:06 +00:00
DNAMP2: Prevent unnecessary copies
Auto-deduces the exact type instead of using a similar, but slightly off pair type (which causes a copy).
This commit is contained in:
parent
d8ed1a5e79
commit
3d0270cf82
@ -151,7 +151,7 @@ void PAKBridge::build() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const {
|
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const {
|
||||||
for (const std::pair<UniqueID32, DNAMP2::PAK::Entry>& entry : m_pak.m_entries) {
|
for (const auto& entry : m_pak.m_entries) {
|
||||||
if (entry.second.type == FOURCC('ANCS')) {
|
if (entry.second.type == FOURCC('ANCS')) {
|
||||||
PAKEntryReadStream rs = entry.second.beginReadStream(m_node);
|
PAKEntryReadStream rs = entry.second.beginReadStream(m_node);
|
||||||
ANCS ancs;
|
ANCS ancs;
|
||||||
@ -175,7 +175,7 @@ static const atVec4f BottomRow = {{0.f, 0.f, 0.f, 1.f}};
|
|||||||
void PAKBridge::addMAPATransforms(PAKRouter<PAKBridge>& pakRouter,
|
void PAKBridge::addMAPATransforms(PAKRouter<PAKBridge>& pakRouter,
|
||||||
std::unordered_map<UniqueID32, zeus::CMatrix4f>& addTo,
|
std::unordered_map<UniqueID32, zeus::CMatrix4f>& addTo,
|
||||||
std::unordered_map<UniqueID32, hecl::ProjectPath>& pathOverrides) const {
|
std::unordered_map<UniqueID32, hecl::ProjectPath>& pathOverrides) const {
|
||||||
for (const std::pair<UniqueID32, DNAMP2::PAK::Entry>& entry : m_pak.m_entries) {
|
for (const auto& entry : m_pak.m_entries) {
|
||||||
if (entry.second.type == FOURCC('MLVL')) {
|
if (entry.second.type == FOURCC('MLVL')) {
|
||||||
MLVL mlvl;
|
MLVL mlvl;
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user