mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 22:27:43 +00:00
Runtime: Collapse emplace_back() calls where applicable
Same behavior, but with less code.
This commit is contained in:
@@ -51,18 +51,16 @@ std::unique_ptr<float[]> RotationAndOffsetStorage::GetRotationsAndOffsets(const
|
||||
}
|
||||
|
||||
RotationAndOffsetStorage::CRotationAndOffsetVectors::CRotationAndOffsetVectors(CInputStream& in) {
|
||||
u32 quatCount = in.readUint32Big();
|
||||
const u32 quatCount = in.readUint32Big();
|
||||
x0_rotations.reserve(quatCount);
|
||||
for (u32 i = 0; i < quatCount; ++i) {
|
||||
x0_rotations.emplace_back();
|
||||
x0_rotations.back().readBig(in);
|
||||
x0_rotations.emplace_back().readBig(in);
|
||||
}
|
||||
|
||||
u32 vecCount = in.readUint32Big();
|
||||
const u32 vecCount = in.readUint32Big();
|
||||
x10_offsets.reserve(vecCount);
|
||||
for (u32 i = 0; i < vecCount; ++i) {
|
||||
x10_offsets.emplace_back();
|
||||
x10_offsets.back().readBig(in);
|
||||
x10_offsets.emplace_back().readBig(in);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user