Codechange: Use a common sub-class for NewGRFMapping chunks

This commit is contained in:
glx22
2021-07-04 22:44:23 +02:00
committed by Loïc Guilloux
parent 6e627f35ac
commit 7bcc7e11ff
6 changed files with 28 additions and 85 deletions

View File

@@ -66,18 +66,8 @@ struct OBJSChunkHandler : ChunkHandler {
}
};
struct OBIDChunkHandler : ChunkHandler {
OBIDChunkHandler() : ChunkHandler('OBID', CH_TABLE) {}
void Save() const override
{
Save_NewGRFMapping(_object_mngr);
}
void Load() const override
{
Load_NewGRFMapping(_object_mngr);
}
struct OBIDChunkHandler : NewGRFMappingChunkHandler {
OBIDChunkHandler() : NewGRFMappingChunkHandler('OBID', _object_mngr) {}
};
static const OBIDChunkHandler OBID;