From: Steve Lhomme Date: Sat, 15 Oct 2022 08:58:03 +0000 (+0200) Subject: use std::size_t instead of size_t X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83c5dcbeacb3028778899dde5c8a2991a5fb9379;p=libmatroska use std::size_t instead of size_t They are supposed to be the same but it's more C++ friendly. --- diff --git a/matroska/KaxBlock.h b/matroska/KaxBlock.h index 9b8acc9..7be8d09 100644 --- a/matroska/KaxBlock.h +++ b/matroska/KaxBlock.h @@ -251,14 +251,14 @@ class MATROSKA_DLL_API KaxInternalBlock : public EbmlBinary { \return the position in the stream for a given frame \note return -1 if the position doesn't exist */ - std::int64_t GetDataPosition(size_t FrameNumber = 0); + std::int64_t GetDataPosition(std::size_t FrameNumber = 0); /*! \param FrameNumber 0 for the first frame \return the size of a given frame \note return -1 if the position doesn't exist */ - std::int64_t GetFrameSize(size_t FrameNumber = 0); + std::int64_t GetFrameSize(std::size_t FrameNumber = 0); bool IsInvisible() const { return mInvisible; } diff --git a/src/FileKax.cpp b/src/FileKax.cpp index de14d26..7c98cf1 100644 --- a/src/FileKax.cpp +++ b/src/FileKax.cpp @@ -167,7 +167,7 @@ Track * FileMatroska::CreateTrack(const track_type aType) } /*Track *FileMatroska::findTrack(Track * aTrack) const { - for (size_t i=0; iBuffer(); const auto FrameEnd = FrameStart + myBuffers[Index]->Size(); const auto ExpectedEnd = (Index + 1) < NumFrames ? myBuffers[Index + 1]->Buffer() : BufferEnd; @@ -906,14 +906,14 @@ void KaxInternalBlock::SetParent(KaxCluster & aParentCluster) } } -std::int64_t KaxInternalBlock::GetDataPosition(size_t FrameNumber) +std::int64_t KaxInternalBlock::GetDataPosition(std::size_t FrameNumber) { std::int64_t _Result = -1; if (ValueIsSet() && FrameNumber < SizeList.size()) { _Result = FirstFrameLocation; - size_t _Idx = 0; + std::size_t _Idx = 0; while(FrameNumber--) { _Result += SizeList[_Idx++]; } @@ -922,7 +922,7 @@ std::int64_t KaxInternalBlock::GetDataPosition(size_t FrameNumber) return _Result; } -std::int64_t KaxInternalBlock::GetFrameSize(size_t FrameNumber) +std::int64_t KaxInternalBlock::GetFrameSize(std::size_t FrameNumber) { std::int64_t _Result = -1; diff --git a/src/KaxCluster.cpp b/src/KaxCluster.cpp index b3d8038..5fc641a 100644 --- a/src/KaxCluster.cpp +++ b/src/KaxCluster.cpp @@ -140,7 +140,7 @@ bool KaxCluster::AddFrame(const KaxTrackEntry & track, std::uint64_t timecode, D filepos_t KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault) { filepos_t Result = 0; - size_t Index; + std::size_t Index; // update the Timecode of the Cluster before writing auto Timecode = static_cast(this->FindElt(EBML_INFO(KaxClusterTimecode)));