Remove unused ChunkType flag CH_AUTO_LENGTH
CH_AUTO_LENGTH is no longer used anywhere, so remove all code that depends on it. (cherry picked from commit 9c620d9de5d45b78f7d992d6b3897009fe988d86)
This commit is contained in:

committed by
Jonathan G Rennison

parent
ec157b4a66
commit
4a19babf9e
@@ -1840,32 +1840,6 @@ static void SlLoadCheckChunk(const ChunkHandler *ch)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub Chunk handlers to only calculate length and do nothing else.
|
||||
* The intended chunk handler that should be called.
|
||||
*/
|
||||
static ChunkSaveLoadProc *_stub_save_proc;
|
||||
|
||||
/**
|
||||
* Stub Chunk handlers to only calculate length and do nothing else.
|
||||
* Actually call the intended chunk handler.
|
||||
* @param arg ignored parameter.
|
||||
*/
|
||||
static inline void SlStubSaveProc2(void *arg)
|
||||
{
|
||||
_stub_save_proc();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub Chunk handlers to only calculate length and do nothing else.
|
||||
* Call SlAutoLenth with our stub save proc that will eventually
|
||||
* call the intended chunk handler.
|
||||
*/
|
||||
static void SlStubSaveProc()
|
||||
{
|
||||
SlAutolength(SlStubSaveProc2, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save a chunk of data (eg. vehicles, stations, etc.). Each chunk is
|
||||
* prefixed by an ID identifying it, followed by data, and terminator where appropriate
|
||||
@@ -1881,12 +1855,6 @@ static void SlSaveChunk(const ChunkHandler *ch)
|
||||
SlWriteUint32(ch->id);
|
||||
DEBUG(sl, 2, "Saving chunk %c%c%c%c", ch->id >> 24, ch->id >> 16, ch->id >> 8, ch->id);
|
||||
|
||||
if (ch->flags & CH_AUTO_LENGTH) {
|
||||
/* Need to calculate the length. Solve that by calling SlAutoLength in the save_proc. */
|
||||
_stub_save_proc = proc;
|
||||
proc = SlStubSaveProc;
|
||||
}
|
||||
|
||||
_sl.block_mode = ch->flags & CH_TYPE_MASK;
|
||||
switch (ch->flags & CH_TYPE_MASK) {
|
||||
case CH_RIFF:
|
||||
|
Reference in New Issue
Block a user