diff --git a/ebml/EbmlBinary.h b/ebml/EbmlBinary.h index 49555327..e57b0958 100644 --- a/ebml/EbmlBinary.h +++ b/ebml/EbmlBinary.h @@ -30,7 +30,6 @@ class EBML_DLL_API EbmlBinary : public EbmlElement { EbmlBinary& operator=(const EbmlBinary & ElementToClone); ~EbmlBinary() override; - bool SizeIsValid(std::uint64_t size) const override {return size < 0x7FFFFFFF;} // we don't mind about what's inside static inline bool SizeIsValid(std::uint64_t size) {return size < 0x7FFFFFFF;} // we don't mind about what's inside filepos_t RenderData(IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter = WriteSkipDefault) override; diff --git a/ebml/EbmlCrc32.h b/ebml/EbmlCrc32.h index e9b7cec8..4b456e82 100644 --- a/ebml/EbmlCrc32.h +++ b/ebml/EbmlCrc32.h @@ -13,7 +13,7 @@ namespace libebml { -DECLARE_EBML_BINARY_LENGTH(EbmlCrc32, 4) +DECLARE_EBML_BINARY(EbmlCrc32) public: filepos_t RenderData(IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter = WriteSkipDefault) override; filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA) override; diff --git a/ebml/EbmlDate.h b/ebml/EbmlDate.h index 4ab2395a..201453bd 100644 --- a/ebml/EbmlDate.h +++ b/ebml/EbmlDate.h @@ -41,8 +41,6 @@ class EBML_DLL_API EbmlDate : public EbmlElementDefaultSameStorage std::int64_t GetEpochDate() const {return EbmlToEpoch(EbmlElementDefaultSameStorage::GetValue());} std::int64_t GetValue() const {return GetEpochDate();} - bool SizeIsValid(std::uint64_t size) const override {return size == 8 || size == 0;} - static inline bool SizeIsValid(std::uint64_t size) {return size == 8 || size == 0;} /*! diff --git a/ebml/EbmlElement.h b/ebml/EbmlElement.h index ccda413a..18292996 100644 --- a/ebml/EbmlElement.h +++ b/ebml/EbmlElement.h @@ -187,10 +187,6 @@ class DllApi x : public BaseClass { \ #define DECLARE_xxx_BINARY(x,DllApi) \ DECLARE_xxx_BASE(x, DllApi, libebml::EbmlBinary) -#define DECLARE_xxx_BINARY_LENGTH(x,len,DllApi) \ - DECLARE_xxx_BASE(x, DllApi, libebml::EbmlBinary) \ - bool SizeIsValid(std::uint64_t size) const override {return size == len;} - #define DECLARE_xxx_UINTEGER(x,DllApi) \ DECLARE_xxx_BASE_NODEFAULT(x, DllApi, libebml::EbmlUInteger, std::uint64_t) @@ -231,7 +227,6 @@ class DllApi x : public BaseClass { \ #define DECLARE_EBML_UINTEGER_DEF(x) DECLARE_xxx_UINTEGER_DEF(x,EBML_DLL_API) #define DECLARE_EBML_STRING_DEF(x) DECLARE_xxx_STRING_DEF( x,EBML_DLL_API) #define DECLARE_EBML_BINARY(x) DECLARE_xxx_BINARY( x,EBML_DLL_API) -#define DECLARE_EBML_BINARY_LENGTH(x,len) DECLARE_xxx_BINARY_LENGTH(x,len,EBML_DLL_API) #define EBML_CONCRETE_CLASS(Type) \ public: \ @@ -509,7 +504,6 @@ class EBML_DLL_API EbmlElement { return false; } - virtual bool SizeIsValid(std::uint64_t) const = 0; bool ValidateSize() const { return ElementSpec().IsSizeValid(GetSize()); } std::uint64_t GetElementPosition() const { diff --git a/ebml/EbmlFloat.h b/ebml/EbmlFloat.h index af3e319a..7189aa29 100644 --- a/ebml/EbmlFloat.h +++ b/ebml/EbmlFloat.h @@ -25,11 +25,6 @@ class EBML_DLL_API EbmlFloat : public EbmlElementDefaultSameStorage { EbmlFloat(const EbmlCallbacksDefault &, Precision prec = FLOAT_32); - bool SizeIsValid(std::uint64_t size) const override - { - return (size == 4 || size == 8); - } - static inline bool SizeIsValid(std::uint64_t size) { return (size == 4 || size == 8); diff --git a/ebml/EbmlMaster.h b/ebml/EbmlMaster.h index 24a5a597..39cde20e 100644 --- a/ebml/EbmlMaster.h +++ b/ebml/EbmlMaster.h @@ -31,7 +31,6 @@ class EBML_DLL_API EbmlMaster : public EbmlElement { explicit EbmlMaster(const EbmlCallbacks &, bool bSizeIsKnown = true); EbmlMaster(const EbmlMaster & ElementToClone); EbmlMaster& operator=(const EbmlMaster&) = delete; - bool SizeIsValid(std::uint64_t /*size*/) const override {return true;} static inline bool SizeIsValid(std::uint64_t /*size*/) {return true;} /*! diff --git a/ebml/EbmlSInteger.h b/ebml/EbmlSInteger.h index ddcbf2ab..3c2d1e33 100644 --- a/ebml/EbmlSInteger.h +++ b/ebml/EbmlSInteger.h @@ -31,7 +31,6 @@ class EBML_DLL_API EbmlSInteger : public EbmlElementDefaultSameStorage &); - bool SizeIsValid(std::uint64_t size) const override {return size < 0x7FFFFFFF;} // any size is possible static inline bool SizeIsValid(std::uint64_t size) {return size < 0x7FFFFFFF;} // any size is possible filepos_t RenderData(IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter = WriteSkipDefault) override; filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA) override; diff --git a/ebml/EbmlUInteger.h b/ebml/EbmlUInteger.h index 8aee81c7..bb22e12c 100644 --- a/ebml/EbmlUInteger.h +++ b/ebml/EbmlUInteger.h @@ -29,7 +29,6 @@ class EBML_DLL_API EbmlUInteger : public EbmlElementDefaultSameStorage &); - bool SizeIsValid(std::uint64_t /*size*/) const override {return true;} // any size is possible static inline bool SizeIsValid(std::uint64_t /*size*/) {return true;} // any size is possible filepos_t RenderData(IOCallback & output, bool bForceRender, const ShouldWrite & writeFilter = WriteSkipDefault) override; filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA) override;