From: Steve Lhomme Date: Sat, 15 Oct 2022 13:25:23 +0000 (+0200) Subject: replace EBML_PRETTYLONGINT with proper C++ integer literal X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=597689dfcc8fbd59a2a09cd00830e2ad84d4e17b;p=libmatroska replace EBML_PRETTYLONGINT with proper C++ integer literal 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(). --- diff --git a/src/KaxCues.cpp b/src/KaxCues.cpp index 3af6ecc..15706fc 100644 --- a/src/KaxCues.cpp +++ b/src/KaxCues.cpp @@ -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)) { diff --git a/src/KaxCuesData.cpp b/src/KaxCuesData.cpp index be50b90..bd50efb 100644 --- a/src/KaxCuesData.cpp +++ b/src/KaxCuesData.cpp @@ -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(FindFirstElt(EBML_INFO(KaxCueTrackPositions))); while (aPoss) {