Saveload: Rename CH_UNUSED to CH_READONLY

This commit is contained in:
Jonathan G Rennison 2024-07-08 18:20:30 +01:00
parent cf573d4bf8
commit 8d9c988767
3 changed files with 6 additions and 6 deletions

View File

@ -108,8 +108,8 @@ static void Check_DBGD()
} }
extern const ChunkHandler debug_chunk_handlers[] = { extern const ChunkHandler debug_chunk_handlers[] = {
{ 'DBGL', nullptr, Load_DBGL, nullptr, Check_DBGL, CH_UNUSED }, { 'DBGL', nullptr, Load_DBGL, nullptr, Check_DBGL, CH_READONLY },
{ 'DBGC', nullptr, Load_DBGC, nullptr, Check_DBGC, CH_UNUSED }, { 'DBGC', nullptr, Load_DBGC, nullptr, Check_DBGC, CH_READONLY },
{ 'DBGD', Save_DBGD, Load_DBGD, nullptr, Check_DBGD, CH_TABLE }, { 'DBGD', Save_DBGD, Load_DBGD, nullptr, Check_DBGD, CH_TABLE },
}; };

View File

@ -210,7 +210,7 @@ static void Load_MISC()
static const ChunkHandler misc_chunk_handlers[] = { static const ChunkHandler misc_chunk_handlers[] = {
{ 'DATE', Save_DATE, Load_DATE, nullptr, Check_DATE, CH_TABLE }, { 'DATE', Save_DATE, Load_DATE, nullptr, Check_DATE, CH_TABLE },
MakeSaveUpstreamFeatureConditionalLoadUpstreamChunkHandler<'VIEW', XSLFI_TABLE_MISC_SL>(Load_VIEW, nullptr, nullptr), MakeSaveUpstreamFeatureConditionalLoadUpstreamChunkHandler<'VIEW', XSLFI_TABLE_MISC_SL>(Load_VIEW, nullptr, nullptr),
{ 'MISC', nullptr, Load_MISC, nullptr, nullptr, CH_UNUSED }, { 'MISC', nullptr, Load_MISC, nullptr, nullptr, CH_READONLY },
}; };
extern const ChunkHandlerTable _misc_chunk_handlers(misc_chunk_handlers); extern const ChunkHandlerTable _misc_chunk_handlers(misc_chunk_handlers);

View File

@ -112,7 +112,7 @@ enum ChunkType {
CH_SPARSE_TABLE = 4, CH_SPARSE_TABLE = 4,
CH_EXT_HDR = 15, ///< Extended chunk header CH_EXT_HDR = 15, ///< Extended chunk header
CH_UNUSED = 0x80, CH_READONLY = 0x80,
}; };
/** Handlers and description of chunk. */ /** Handlers and description of chunk. */
@ -180,7 +180,7 @@ namespace upstream_sl {
SlUnreachablePlaceholder, SlUnreachablePlaceholder,
SlUnreachablePlaceholder, SlUnreachablePlaceholder,
SlUnreachablePlaceholder, SlUnreachablePlaceholder,
CH_UNUSED CH_READONLY
}; };
ch.special_proc = [](uint32_t chunk_id, ChunkSaveLoadSpecialOp op) -> ChunkSaveLoadSpecialOpResult { ch.special_proc = [](uint32_t chunk_id, ChunkSaveLoadSpecialOp op) -> ChunkSaveLoadSpecialOpResult {
assert(id == chunk_id); assert(id == chunk_id);
@ -262,7 +262,7 @@ namespace upstream_sl {
template <uint32_t id, SlXvFeatureIndex feature, uint16_t min_version = 1, uint16_t max_version = 0xFFFF> template <uint32_t id, SlXvFeatureIndex feature, uint16_t min_version = 1, uint16_t max_version = 0xFFFF>
ChunkHandler MakeSaveUpstreamFeatureConditionalLoadUpstreamChunkHandler(ChunkSaveLoadProc *load_proc, ChunkSaveLoadProc *ptrs_proc, ChunkSaveLoadProc *load_check_proc) ChunkHandler MakeSaveUpstreamFeatureConditionalLoadUpstreamChunkHandler(ChunkSaveLoadProc *load_proc, ChunkSaveLoadProc *ptrs_proc, ChunkSaveLoadProc *load_check_proc)
{ {
return MakeConditionallyUpstreamChunkHandler<id, SaveUpstreamFeatureConditionalLoadUpstreamChunkInfo<feature, min_version, max_version>>(nullptr, load_proc, ptrs_proc, load_check_proc, CH_UNUSED); return MakeConditionallyUpstreamChunkHandler<id, SaveUpstreamFeatureConditionalLoadUpstreamChunkInfo<feature, min_version, max_version>>(nullptr, load_proc, ptrs_proc, load_check_proc, CH_READONLY);
} }
} }