Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid compiler warnings #152

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ebml/EbmlBinary.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class EBML_DLL_API EbmlBinary : public EbmlElement {
SetValueIsSet();
}

using EbmlElement::operator const EbmlId &;
operator const binary &() const;

bool IsDefaultValue() const override {
Expand Down
1 change: 1 addition & 0 deletions ebml/EbmlFloat.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class EBML_DLL_API EbmlFloat : public EbmlElement {

bool IsSmallerThan(const EbmlElement *Cmp) const override;

using EbmlElement::operator const EbmlId &;
operator float() const;
operator double() const;

Expand Down
1 change: 1 addition & 0 deletions ebml/EbmlSInteger.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class EBML_DLL_API EbmlSInteger : public EbmlElement {

bool IsSmallerThan(const EbmlElement *Cmp) const override;

using EbmlElement::operator const EbmlId &;
explicit operator std::int8_t() const;
explicit operator std::int16_t() const;
explicit operator std::int32_t() const;
Expand Down
1 change: 1 addition & 0 deletions ebml/EbmlString.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class EBML_DLL_API EbmlString : public EbmlElement {
filepos_t UpdateSize(bool bWithDefault = false, bool bForceRender = false) override;

EbmlString & operator=(const std::string &);
using EbmlElement::operator const EbmlId &;
explicit operator const std::string &() const;

EbmlString &SetValue(std::string const &NewValue);
Expand Down
1 change: 1 addition & 0 deletions ebml/EbmlUInteger.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class EBML_DLL_API EbmlUInteger : public EbmlElement {

bool IsSmallerThan(const EbmlElement *Cmp) const override;

using EbmlElement::operator const EbmlId &;
explicit operator std::uint8_t() const;
explicit operator std::uint16_t() const;
explicit operator std::uint32_t() const;
Expand Down
1 change: 1 addition & 0 deletions ebml/EbmlUnicodeString.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class EBML_DLL_API EbmlUnicodeString : public EbmlElement {
filepos_t UpdateSize(bool bWithDefault = false, bool bForceRender = false) override;

EbmlUnicodeString & operator=(const UTFstring &); ///< platform dependant code
using EbmlElement::operator const EbmlId &;
explicit operator const UTFstring &() const;

EbmlUnicodeString &SetValue(UTFstring const &NewValue);
Expand Down
2 changes: 1 addition & 1 deletion src/EbmlElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int CodedSizeLength(std::uint64_t Length, unsigned int SizeLength, bool bSizeIsF
*/
int CodedSizeLengthSigned(std::int64_t Length, unsigned int SizeLength)
{
int CodedSize;
unsigned int CodedSize;
// prepare the head of the size (000...01xxxxxx)
// optimal size
if (Length > -64 && Length < 64) // 2^6
Expand Down