if (Result != GetSize())
throw SafeReadIOCallback::EndOfStreamX(GetSize() - Result);
- binary *BufferStart = EbmlBinary::GetBuffer();
+ binary *const BufferStart = EbmlBinary::GetBuffer();
SafeReadIOCallback Mem(*this);
uint8 BlockHeadSize = 4;
}
}
- binary *BufferEnd = BufferStart + GetSize();
+ binary *const BufferEnd = BufferStart + GetSize();
const size_t NumFrames = myBuffers.size();
// Sanity checks for frame pointers and boundaries.
for (size_t Index = 0; Index < NumFrames; ++Index) {
- binary *FrameStart = myBuffers[Index]->Buffer();
- binary *FrameEnd = FrameStart + myBuffers[Index]->Size();
- binary *ExpectedEnd = (Index + 1) < NumFrames ? myBuffers[Index + 1]->Buffer() : BufferEnd;
+ binary *const FrameStart = myBuffers[Index]->Buffer();
+ binary *const FrameEnd = FrameStart + myBuffers[Index]->Size();
+ binary *const ExpectedEnd = (Index + 1) < NumFrames ? myBuffers[Index + 1]->Buffer() : BufferEnd;
if ((FrameStart < BufferStart) || (FrameEnd > BufferEnd) || (FrameEnd != ExpectedEnd))
throw SafeReadIOCallback::EndOfStreamX(0);
else {
if (Block.simpleblock != nullptr) {
- KaxSimpleBlock *old_simpleblock = Block.simpleblock;
+ KaxSimpleBlock *const old_simpleblock = Block.simpleblock;
Block.group = new KaxBlockGroup();
// _TODO_ : move all the data to the blockgroup
assert(false);
uint64 KaxCues::GetTimecodePosition(uint64 aTimecode) const
{
- const KaxCuePoint * aPoint = GetTimecodePoint(aTimecode);
+ const KaxCuePoint * const aPoint = GetTimecodePoint(aTimecode);
if (aPoint == nullptr)
return 0;
- const KaxCueTrackPositions * aTrack = aPoint->GetSeekPosition();
+ const KaxCueTrackPositions * const aTrack = aPoint->GetSeekPosition();
if (aTrack == nullptr)
return 0;
#endif // MATROSKA_VERSION
if (BlockGroup != nullptr) {
- const KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockGroup->FindFirstElt(EBML_INFO(KaxCodecState)));
+ const auto CodecState = static_cast<const KaxCodecState *>(BlockGroup->FindFirstElt(EBML_INFO(KaxCodecState)));
if (CodecState != nullptr) {
auto &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
*static_cast<EbmlUInteger*>(&CueCodecState) = BlockGroup->GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());