rename ChunkcContainer::addChild/addSimpleChild to push/emplace (#6704)
'child' didn't make any sense in this API, push/emplace mimics std::vector, which is closer to what the api actually does.
This commit is contained in:
@@ -328,8 +328,8 @@ void ShaderIndex::writeChunks(ostream& stream) {
|
||||
}
|
||||
|
||||
filamat::ChunkContainer cc;
|
||||
const auto& dchunk = cc.addChild<DictionaryTextChunk>(std::move(lines), mDictTag);
|
||||
cc.addChild<MaterialTextChunk>(std::move(mShaderRecords), dchunk.getDictionary(), mMatTag);
|
||||
const auto& dchunk = cc.push<DictionaryTextChunk>(std::move(lines), mDictTag);
|
||||
cc.push<MaterialTextChunk>(std::move(mShaderRecords), dchunk.getDictionary(), mMatTag);
|
||||
|
||||
const size_t bufSize = cc.getSize();
|
||||
auto buffer = std::make_unique<uint8_t[]>(bufSize);
|
||||
@@ -391,8 +391,8 @@ void BlobIndex::writeChunks(ostream& stream) {
|
||||
|
||||
// Apply SMOL-V compression and write out the results.
|
||||
filamat::ChunkContainer cc;
|
||||
cc.addChild<MaterialSpirvChunk>(std::move(mShaderRecords));
|
||||
cc.addChild<DictionarySpirvChunk>(std::move(blobs), false);
|
||||
cc.push<MaterialSpirvChunk>(std::move(mShaderRecords));
|
||||
cc.push<DictionarySpirvChunk>(std::move(blobs), false);
|
||||
|
||||
Flattener prepass = Flattener::getDryRunner();
|
||||
initialize(prepass);
|
||||
|
||||
Reference in New Issue
Block a user