Codechange: Use TypedIndexContainer for typed index containers

Instead of ReferenceThroughBaseContainer
This commit is contained in:
Jonathan G Rennison
2025-06-08 20:46:58 +01:00
committed by Peter Nelson
parent d0e49a297f
commit 63f1c2aa3a
17 changed files with 23 additions and 23 deletions

View File

@@ -41,7 +41,7 @@ static const SaveLoad _engine_desc[] = {
SLE_CONDSSTR(Engine, name, SLE_STR, SLV_84, SL_MAX_VERSION),
};
static ReferenceThroughBaseContainer<std::vector<Engine>> _temp_engine;
static TypedIndexContainer<std::vector<Engine>, EngineID> _temp_engine;
Engine *GetTempDataEngine(EngineID index)
{
@@ -134,7 +134,7 @@ struct ENGSChunkHandler : ChunkHandler {
{
/* Load old separate String ID list into a temporary array. This
* was always 256 entries. */
ReferenceThroughBaseContainer<std::array<StringID, 256>> names{};
TypedIndexContainer<std::array<StringID, 256>, EngineID> names{};
SlCopy(names.data(), std::size(names), SLE_STRINGID);