Skip to content

Commit

Permalink
Don't assert when calling incorrectly SetSizeInfinite()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
robUx4 committed Dec 23, 2023
1 parent ad567ee commit d0a39b4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ebml/EbmlElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0a39b4

Please sign in to comment.