Skip to content

Commit

Permalink
provide a stronger typed version of EbmlStream::FindNextID()
Browse files Browse the repository at this point in the history
  • Loading branch information
robUx4 committed Mar 2, 2024
1 parent 84e19bc commit 0076f76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ebml/EbmlStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ class EBML_DLL_API EbmlStream {
*/
EbmlElement * FindNextID(const EbmlCallbacks & ClassInfos, std::uint64_t MaxDataSize) const;

template <typename Type>
Type * FindNextID(std::uint64_t MaxDataSize)
{
return static_cast<Type *>(FindNextID(EBML_INFO(Type), MaxDataSize));
}

EbmlElement * FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, std::uint64_t MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1) const;

inline IOCallback & I_O() {return Stream;}
Expand Down

0 comments on commit 0076f76

Please sign in to comment.