]> granicus.if.org Git - libmatroska/commitdiff
use std::size_t instead of size_t
authorSteve Lhomme <slhomme@matroska.org>
Sat, 15 Oct 2022 08:58:03 +0000 (10:58 +0200)
committerSteve Lhomme <robux4@ycbcr.xyz>
Sat, 15 Oct 2022 14:24:00 +0000 (16:24 +0200)
They are supposed to be the same but it's more C++ friendly.

matroska/KaxBlock.h
src/FileKax.cpp
src/KaxBlock.cpp
src/KaxCluster.cpp

index 9b8acc97e6127a759077a1a7b2f8ee593dbec2cd..7be8d098a00685ea40634e371aa60f8ed5ce039e 100644 (file)
@@ -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; }
 
index de14d261b86ae4851e9dc036a38c07bbef752c40..7c98cf1ac544e5bbdf2cec7da83b645ae8e1296f 100644 (file)
@@ -167,7 +167,7 @@ Track * FileMatroska::CreateTrack(const track_type aType)
 }
 
 /*Track *FileMatroska::findTrack(Track * aTrack) const {
-  for (size_t i=0; i<myTracks.size(); i++) {
+  for (std::size_t i=0; i<myTracks.size(); i++) {
   if (myTracks[i] == aTrack)
   return myTracks[i];
   }
index 54523f1ec61e131e31c5b22b6282c80e67e14cc2..e60d5278d955004b589e1cf67a984d1ee06bd648 100644 (file)
@@ -562,10 +562,10 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
       }
 
       const auto BufferEnd = BufferStart + GetSize();
-      const size_t NumFrames  = myBuffers.size();
+      const std::size_t NumFrames  = myBuffers.size();
 
       // Sanity checks for frame pointers and boundaries.
-      for (size_t Index = 0; Index < NumFrames; ++Index) {
+      for (std::size_t Index = 0; Index < NumFrames; ++Index) {
         const auto FrameStart  = myBuffers[Index]->Buffer();
         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;
 
index b3d803896e888c6f2d049f01320008d5136e8b67..5fc641a862f642e77e760cb401260559119b0123 100644 (file)
@@ -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<KaxClusterTimecode *>(this->FindElt(EBML_INFO(KaxClusterTimecode)));