Add a convenience function to create a Metadata::Padding object with a

certain size in one statement.

Patch from Bastiaan Timmer <basjetimmer@yahoo.com>
This commit is contained in:
Erik de Castro Lopo
2012-09-11 15:52:24 +10:00
parent 8d9e5c6e8e
commit b21f190861
2 changed files with 12 additions and 0 deletions

View File

@@ -359,6 +359,10 @@ namespace FLAC {
*/
inline Padding(::FLAC__StreamMetadata *object, bool copy): Prototype(object, copy) { }
/** Constructs an object with the given length.
*/
Padding(unsigned length);
~Padding();
//@{
@@ -387,6 +391,8 @@ namespace FLAC {
inline bool operator!=(const ::FLAC__StreamMetadata *object) const { return Prototype::operator!=(object); }
//@}
/** Sets the length in bytes of the padding block.
*/
void set_length(unsigned length);
};