Skip to content

Commit c392c1b

Browse files
committed
use C++ casting in macros
Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent 137da5c commit c392c1b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ebml/EbmlElement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ class EBML_DLL_API EbmlElement {
600600

601601
private:
602602
std::size_t HeadSize() const {
603-
return EBML_ID_LENGTH((const EbmlId&)*this) + CodedSizeLength(Size, SizeLength, bSizeIsFinite);
603+
return EBML_ID_LENGTH(static_cast<const EbmlId&>(*this)) + CodedSizeLength(Size, SizeLength, bSizeIsFinite);
604604
} /// return the size of the head, on reading/writing
605605

606606
std::uint64_t Size; ///< the size of the data to write

src/EbmlElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ filepos_t EbmlElement::MakeRenderHead(IOCallback & output, bool bKeepPosition)
514514
std::array<binary, 4 + 8> FinalHead; // Class D + 64 bits coded size
515515
std::size_t FinalHeadSize;
516516

517-
FinalHeadSize = EBML_ID_LENGTH((const EbmlId&)*this);
517+
FinalHeadSize = EBML_ID_LENGTH(static_cast<const EbmlId&>(*this));
518518
EbmlId(*this).Fill(FinalHead.data());
519519

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

0 commit comments

Comments
 (0)