Skip to content

Commit

Permalink
make EbmlElement::HeadSize private
Browse files Browse the repository at this point in the history
The Head size is rarely needed and may be 0 depending on writing filter.
  • Loading branch information
robUx4 committed Feb 18, 2024
1 parent deeceaa commit 42ae016
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ebml/EbmlElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,6 @@ class EBML_DLL_API EbmlElement {
virtual bool IsDummy() const {return false;}
virtual bool IsMaster() const {return false;}

std::size_t HeadSize() const {
return EBML_ID_LENGTH((const EbmlId&)*this) + CodedSizeLength(Size, SizeLength, bSizeIsFinite);
} /// return the size of the head, on reading/writing

/*!
\brief Force the size of an element
\warning only possible if the size is "undefined"
Expand Down Expand Up @@ -600,6 +596,10 @@ class EBML_DLL_API EbmlElement {
const EbmlCallbacks & ClassInfo;

private:
std::size_t HeadSize() const {
return EBML_ID_LENGTH((const EbmlId&)*this) + CodedSizeLength(Size, SizeLength, bSizeIsFinite);
} /// return the size of the head, on reading/writing

std::uint64_t Size; ///< the size of the data to write
std::uint64_t DefaultSize; ///< Minimum data size to fill on rendering (0 = optimal)
int SizeLength{0}; /// the minimum size on which the size will be written (0 = optimal)
Expand Down

0 comments on commit 42ae016

Please sign in to comment.