diff options
| author | Theresa Foley <10618364+tangent-vector@users.noreply.github.com> | 2025-05-12 10:28:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-12 17:28:05 +0000 |
| commit | 4c76b275907cf2d764f3fc51468d1c58635a10c1 (patch) | |
| tree | 201a353c2b64b258760c370e641821ec5f6eff85 /source/slang/slang-serialize-source-loc.cpp | |
| parent | 6b286bfbdf85e40cac1ee325384f535df969938a (diff) | |
Cleanups related to RIFF support (#7041)
Diffstat (limited to 'source/slang/slang-serialize-source-loc.cpp')
| -rw-r--r-- | source/slang/slang-serialize-source-loc.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/source/slang/slang-serialize-source-loc.cpp b/source/slang/slang-serialize-source-loc.cpp index b24324048..f612a6fb3 100644 --- a/source/slang/slang-serialize-source-loc.cpp +++ b/source/slang/slang-serialize-source-loc.cpp @@ -385,47 +385,44 @@ SlangResult SerialSourceLocReader::read( /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DebugSerialData !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ -/* static */ Result SerialSourceLocData::writeContainer(RiffContainer* container) +/* static */ Result SerialSourceLocData::writeTo(RIFF::BuildCursor& cursor) { - RiffContainer::ScopeChunk debugChunkScope( - container, - RiffContainer::Chunk::Kind::List, - SerialSourceLocData::kDebugFourCc); + SLANG_SCOPED_RIFF_BUILDER_LIST_CHUNK(cursor, SerialSourceLocData::kDebugFourCc); SLANG_RETURN_ON_FAIL(SerialRiffUtil::writeArrayChunk( SerialSourceLocData::kDebugStringFourCc, m_stringTable, - container)); + cursor)); SLANG_RETURN_ON_FAIL(SerialRiffUtil::writeArrayChunk( SerialSourceLocData::kDebugLineInfoFourCc, m_lineInfos, - container)); + cursor)); SLANG_RETURN_ON_FAIL(SerialRiffUtil::writeArrayChunk( SerialSourceLocData::kDebugAdjustedLineInfoFourCc, m_adjustedLineInfos, - container)); + cursor)); SLANG_RETURN_ON_FAIL(SerialRiffUtil::writeArrayChunk( SerialSourceLocData::kDebugSourceInfoFourCc, m_sourceInfos, - container)); + cursor)); return SLANG_OK; } -/* static */ Result SerialSourceLocData::readContainer(RiffContainer::ListChunk* listChunk) +/* static */ Result SerialSourceLocData::readFrom(RIFF::ListChunk const* listChunk) { - SLANG_ASSERT(listChunk->getSubType() == SerialSourceLocData::kDebugFourCc); + SLANG_ASSERT(listChunk->getType() == SerialSourceLocData::kDebugFourCc); clear(); - for (RiffContainer::Chunk* chunk = listChunk->m_containedChunks; chunk; chunk = chunk->m_next) + for (auto chunk : listChunk->getChildren()) { - RiffContainer::DataChunk* dataChunk = as<RiffContainer::DataChunk>(chunk); + auto dataChunk = as<RIFF::DataChunk>(chunk); if (!dataChunk) { continue; } - switch (dataChunk->m_fourCC) + switch (dataChunk->getType()) { case SerialSourceLocData::kDebugStringFourCc: { |
