}
// put the data of each frame
- for (i=0; i<myBuffers.size(); i++) {
- output.writeFully(myBuffers[i]->Buffer(), myBuffers[i]->Size());
- SetSize_(GetSize() + myBuffers[i]->Size());
+ for (const auto& myBuf : myBuffers) {
+ output.writeFully(myBuf->Buffer(), myBuf->Size());
+ SetSize_(GetSize() + myBuf->Size());
}
}
}
} else {
// new school, using KaxBlockBlob
- for (Index = 0; Index<Blobs.size(); Index++) {
- if (Blobs[Index]->IsSimpleBlock())
- PushElement( static_cast<KaxSimpleBlock&>(*Blobs[Index]));
+ for (const auto& blob : Blobs) {
+ if (blob->IsSimpleBlock())
+ PushElement( static_cast<KaxSimpleBlock&>(*blob));
else
- PushElement( static_cast<KaxBlockGroup&>(*Blobs[Index]));
+ PushElement( static_cast<KaxBlockGroup&>(*blob));
}
// SilentTracks handling
Result = EbmlMaster::Render(output, bSaveDefault);
// For all Blocks add their position on the CueEntry
- for (Index = 0; Index<Blobs.size(); Index++) {
- CueToUpdate.PositionSet(*Blobs[Index]);
- }
+ for (const auto& blob : Blobs)
+ CueToUpdate.PositionSet(*blob);
Blobs.clear();
}