Cleanup: Use std::vector in RandomSpriteGroup.

(cherry picked from commit 913d8a7f28)
This commit is contained in:
Peter Nelson
2021-05-02 00:00:40 +01:00
committed by Jonathan G Rennison
parent a69a1d19a9
commit f5722a999e
3 changed files with 6 additions and 14 deletions

View File

@@ -5273,11 +5273,10 @@ static void NewSpriteGroup(ByteReader *buf)
group->triggers = GB(triggers, 0, 7);
group->cmp_mode = HasBit(triggers, 7) ? RSG_CMP_ALL : RSG_CMP_ANY;
group->lowest_randbit = buf->ReadByte();
group->num_groups = buf->ReadByte();
group->groups = CallocT<const SpriteGroup*>(group->num_groups);
for (uint i = 0; i < group->num_groups; i++) {
group->groups[i] = GetGroupFromGroupID(setid, type, buf->ReadWord());
byte num_groups = buf->ReadByte();
for (uint i = 0; i < num_groups; i++) {
group->groups.push_back(GetGroupFromGroupID(setid, type, buf->ReadWord()));
}
break;