Skip to content

Commit

Permalink
use C++ casting in macros
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Feb 24, 2024
1 parent 137da5c commit c392c1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ebml/EbmlElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ class EBML_DLL_API EbmlElement {

private:
std::size_t HeadSize() const {
return EBML_ID_LENGTH((const EbmlId&)*this) + CodedSizeLength(Size, SizeLength, bSizeIsFinite);
return EBML_ID_LENGTH(static_cast<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
Expand Down
2 changes: 1 addition & 1 deletion src/EbmlElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ filepos_t EbmlElement::MakeRenderHead(IOCallback & output, bool bKeepPosition)
std::array<binary, 4 + 8> FinalHead; // Class D + 64 bits coded size
std::size_t FinalHeadSize;

FinalHeadSize = EBML_ID_LENGTH((const EbmlId&)*this);
FinalHeadSize = EBML_ID_LENGTH(static_cast<const EbmlId&>(*this));
EbmlId(*this).Fill(FinalHead.data());

const unsigned int CodedSize = CodedSizeLength(Size, SizeLength, bSizeIsFinite);
Expand Down

0 comments on commit c392c1b

Please sign in to comment.