From d0a39b42e3dc2ac667e0e91a9d0e199bd095c3c9 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Fri, 22 Dec 2023 07:34:08 +0100 Subject: [PATCH] Don't assert when calling incorrectly SetSizeInfinite() It is called in FindNextId/FindNextElement which always checks for failure. So don't need the assert there. It's also called from the EbmlMaster constructor. The copy constructor is fine since the the original can only have a valid state. The other constructor has a default value of finite size and the macros never set this to infinite. In libmatroska the KaxSegment constructor calls SetSizeInfinite() rather than using the default value. But we don't need an assert there, since we know it's allowed. --- ebml/EbmlElement.h | 1 - 1 file changed, 1 deletion(-) diff --git a/ebml/EbmlElement.h b/ebml/EbmlElement.h index 5dfe6013..ab3bc667 100644 --- a/ebml/EbmlElement.h +++ b/ebml/EbmlElement.h @@ -331,7 +331,6 @@ class EBML_DLL_API EbmlElement { * \return true if setting the value worked */ bool SetSizeInfinite(bool bIsInfinite = true) { - assert(!bIsInfinite || ClassInfo.CanHaveInfiniteSize()); if (ClassInfo.CanHaveInfiniteSize()) { bSizeIsFinite = !bIsInfinite;