summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetPathways.cpp
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2021-01-05 19:00:52 -0500
committerGitHub <noreply@github.com>2021-01-05 19:00:52 -0500
commitd205c406add5d6e2275006130ff0f182f3f5257f (patch)
tree57c3116e5c61c64eabb2407018f32ed09415f3ae /ZAPD/ZRoom/Commands/SetPathways.cpp
parent05be09c56e4fa3460e93ec767690c988781302d2 (diff)
Made a bunch of declarations static. Removed external writes to declarations dictionary. (#55)
* Fixed bug with extraction of ci4 textures * Made a bunch of declarations static * Avoid unnecessary copies (#46) Pass some parameters by reference to avoid unnecessary copies. When the parameter is intended to be copied into a member variable, pass it by value and move it into the member instead. This doesn't fix every occurrence of the issue but this diff is already getting big so let's stop here for the moment. * Removed manual writes to declarations dictionary from external classes. Co-authored-by: Léo Lam <leo@leolam.fr>
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetPathways.cpp')
-rw-r--r--ZAPD/ZRoom/Commands/SetPathways.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/ZAPD/ZRoom/Commands/SetPathways.cpp b/ZAPD/ZRoom/Commands/SetPathways.cpp
index 059b468..0856730 100644
--- a/ZAPD/ZRoom/Commands/SetPathways.cpp
+++ b/ZAPD/ZRoom/Commands/SetPathways.cpp
@@ -19,10 +19,7 @@ SetPathways::SetPathways(ZRoom* nZRoom, std::vector<uint8_t> rawData, int rawDat
uint32_t currentPtr = listSegmentOffset;
if (segmentOffset != 0)
- zRoom->parent->declarations[segmentOffset] = new Declaration(DeclarationAlignment::None, 0, "", "", false, "");
-
- //if (listSegmentOffset != 0)
- //zRoom->declarations[listSegmentOffset] = new Declaration(DeclarationAlignment::None, 0, "");
+ zRoom->parent->AddDeclarationPlaceholder(segmentOffset);
}
void SetPathways::InitList(uint32_t address)