]> granicus.if.org Git - libmatroska/commitdiff
replace EBML_PRETTYLONGINT with proper C++ integer literal
authorSteve Lhomme <slhomme@matroska.org>
Sat, 15 Oct 2022 13:25:23 +0000 (15:25 +0200)
committerSteve Lhomme <slhomme@matroska.org>
Sat, 15 Oct 2022 14:25:40 +0000 (16:25 +0200)
The suffix l/L and ll/LL can/should be used:
https://en.cppreference.com/w/cpp/language/integer_literal

This is equivalent to the previous code with gcc/clang. Theoretically it should
be used to write in a long( long) and for uint64_t values we should use
UINT64_C().

src/KaxCues.cpp
src/KaxCuesData.cpp

index 3af6ecc2d6580769ea1e9a105f97817190bb4612..15706fc55797205360044671d58a2c04e53908a7 100644 (file)
@@ -114,7 +114,7 @@ const KaxCuePoint * KaxCues::GetTimecodePoint(std::uint64_t aTimecode) const
   const std::uint64_t TimecodeToLocate = aTimecode / GlobalTimecodeScale();
   const KaxCuePoint * aPointPrev = nullptr;
   std::uint64_t aPrevTime = 0;
-  std::uint64_t aNextTime = EBML_PRETTYLONGINT(0xFFFFFFFFFFFF);
+  std::uint64_t aNextTime = 0xFFFFFFFFFFFFLL;
 
   for (const auto& e : *this) {
     if (EbmlId(*e) == EBML_ID(KaxCuePoint)) {
index be50b90db4fdc37e6f7497a33e87d594ff49d579..bd50efbaac5fed25f9dfaf366a8b76cb4ff3aa7a 100644 (file)
@@ -197,7 +197,7 @@ bool KaxCuePoint::Timecode(std::uint64_t & aTimecode, std::uint64_t GlobalTimeco
 const KaxCueTrackPositions * KaxCuePoint::GetSeekPosition() const
 {
   const KaxCueTrackPositions * result = nullptr;
-  std::uint64_t aPosition = EBML_PRETTYLONGINT(0xFFFFFFFFFFFFFFF);
+  std::uint64_t aPosition = 0xFFFFFFFFFFFFFFFLL;
   // find the position of the "earlier" Cluster
   auto aPoss = static_cast<const KaxCueTrackPositions *>(FindFirstElt(EBML_INFO(KaxCueTrackPositions)));
   while (aPoss) {