mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Fix numerous warnings arising from addition of -Weffc++.
This commit is contained in:
@@ -72,6 +72,9 @@ protected:
|
|||||||
virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]);
|
virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]);
|
||||||
virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata);
|
virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata);
|
||||||
virtual void error_callback(::FLAC__StreamDecoderErrorStatus status);
|
virtual void error_callback(::FLAC__StreamDecoderErrorStatus status);
|
||||||
|
private:
|
||||||
|
OurDecoder(const OurDecoder&);
|
||||||
|
OurDecoder&operator=(const OurDecoder&);
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
|||||||
@@ -1090,6 +1090,10 @@ namespace FLAC {
|
|||||||
protected:
|
protected:
|
||||||
::FLAC__Metadata_SimpleIterator *iterator_;
|
::FLAC__Metadata_SimpleIterator *iterator_;
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
private: // Do not use.
|
||||||
|
SimpleIterator(const SimpleIterator&);
|
||||||
|
SimpleIterator&operator=(const SimpleIterator&);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* \} */
|
/* \} */
|
||||||
@@ -1174,6 +1178,10 @@ namespace FLAC {
|
|||||||
protected:
|
protected:
|
||||||
::FLAC__Metadata_Chain *chain_;
|
::FLAC__Metadata_Chain *chain_;
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|
||||||
|
private: // Do not use.
|
||||||
|
Chain(const Chain&);
|
||||||
|
Chain&operator=(const Chain&);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** This class is a wrapper around the FLAC__metadata_iterator
|
/** This class is a wrapper around the FLAC__metadata_iterator
|
||||||
@@ -1204,6 +1212,10 @@ namespace FLAC {
|
|||||||
protected:
|
protected:
|
||||||
::FLAC__Metadata_Iterator *iterator_;
|
::FLAC__Metadata_Iterator *iterator_;
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|
||||||
|
private: // Do not use.
|
||||||
|
Iterator(const Iterator&);
|
||||||
|
Iterator&operator=(const Iterator&);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* \} */
|
/* \} */
|
||||||
|
|||||||
@@ -523,36 +523,72 @@ namespace FLAC {
|
|||||||
// VorbisComment::Entry
|
// VorbisComment::Entry
|
||||||
//
|
//
|
||||||
|
|
||||||
VorbisComment::Entry::Entry()
|
VorbisComment::Entry::Entry() :
|
||||||
|
is_valid_(true),
|
||||||
|
entry_(),
|
||||||
|
field_name_(0),
|
||||||
|
field_name_length_(0),
|
||||||
|
field_value_(0),
|
||||||
|
field_value_length_(0)
|
||||||
{
|
{
|
||||||
zero();
|
zero();
|
||||||
}
|
}
|
||||||
|
|
||||||
VorbisComment::Entry::Entry(const char *field, unsigned field_length)
|
VorbisComment::Entry::Entry(const char *field, unsigned field_length) :
|
||||||
|
is_valid_(true),
|
||||||
|
entry_(),
|
||||||
|
field_name_(0),
|
||||||
|
field_name_length_(0),
|
||||||
|
field_value_(0),
|
||||||
|
field_value_length_(0)
|
||||||
{
|
{
|
||||||
zero();
|
zero();
|
||||||
construct(field, field_length);
|
construct(field, field_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
VorbisComment::Entry::Entry(const char *field)
|
VorbisComment::Entry::Entry(const char *field) :
|
||||||
|
is_valid_(true),
|
||||||
|
entry_(),
|
||||||
|
field_name_(0),
|
||||||
|
field_name_length_(0),
|
||||||
|
field_value_(0),
|
||||||
|
field_value_length_(0)
|
||||||
{
|
{
|
||||||
zero();
|
zero();
|
||||||
construct(field);
|
construct(field);
|
||||||
}
|
}
|
||||||
|
|
||||||
VorbisComment::Entry::Entry(const char *field_name, const char *field_value, unsigned field_value_length)
|
VorbisComment::Entry::Entry(const char *field_name, const char *field_value, unsigned field_value_length) :
|
||||||
|
is_valid_(true),
|
||||||
|
entry_(),
|
||||||
|
field_name_(0),
|
||||||
|
field_name_length_(0),
|
||||||
|
field_value_(0),
|
||||||
|
field_value_length_(0)
|
||||||
{
|
{
|
||||||
zero();
|
zero();
|
||||||
construct(field_name, field_value, field_value_length);
|
construct(field_name, field_value, field_value_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
VorbisComment::Entry::Entry(const char *field_name, const char *field_value)
|
VorbisComment::Entry::Entry(const char *field_name, const char *field_value) :
|
||||||
|
is_valid_(true),
|
||||||
|
entry_(),
|
||||||
|
field_name_(0),
|
||||||
|
field_name_length_(0),
|
||||||
|
field_value_(0),
|
||||||
|
field_value_length_(0)
|
||||||
{
|
{
|
||||||
zero();
|
zero();
|
||||||
construct(field_name, field_value);
|
construct(field_name, field_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
VorbisComment::Entry::Entry(const Entry &entry)
|
VorbisComment::Entry::Entry(const Entry &entry) :
|
||||||
|
is_valid_(true),
|
||||||
|
entry_(),
|
||||||
|
field_name_(0),
|
||||||
|
field_name_length_(0),
|
||||||
|
field_value_(0),
|
||||||
|
field_value_length_(0)
|
||||||
{
|
{
|
||||||
FLAC__ASSERT(entry.is_valid());
|
FLAC__ASSERT(entry.is_valid());
|
||||||
zero();
|
zero();
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public:
|
|||||||
bool error_occurred_;
|
bool error_occurred_;
|
||||||
|
|
||||||
DecoderCommon(Layer layer): layer_(layer), current_metadata_number_(0), ignore_errors_(false), error_occurred_(false) { }
|
DecoderCommon(Layer layer): layer_(layer), current_metadata_number_(0), ignore_errors_(false), error_occurred_(false) { }
|
||||||
|
virtual ~DecoderCommon(void) { }
|
||||||
::FLAC__StreamDecoderWriteStatus common_write_callback_(const ::FLAC__Frame *frame);
|
::FLAC__StreamDecoderWriteStatus common_write_callback_(const ::FLAC__Frame *frame);
|
||||||
void common_metadata_callback_(const ::FLAC__StreamMetadata *metadata);
|
void common_metadata_callback_(const ::FLAC__StreamMetadata *metadata);
|
||||||
void common_error_callback_(::FLAC__StreamDecoderErrorStatus status);
|
void common_error_callback_(::FLAC__StreamDecoderErrorStatus status);
|
||||||
@@ -193,6 +194,9 @@ public:
|
|||||||
void error_callback(::FLAC__StreamDecoderErrorStatus status);
|
void error_callback(::FLAC__StreamDecoderErrorStatus status);
|
||||||
|
|
||||||
bool test_respond(bool is_ogg);
|
bool test_respond(bool is_ogg);
|
||||||
|
private:
|
||||||
|
StreamDecoder(const StreamDecoder&);
|
||||||
|
StreamDecoder&operator=(const StreamDecoder&);
|
||||||
};
|
};
|
||||||
|
|
||||||
::FLAC__StreamDecoderReadStatus StreamDecoder::read_callback(FLAC__byte buffer[], size_t *bytes)
|
::FLAC__StreamDecoderReadStatus StreamDecoder::read_callback(FLAC__byte buffer[], size_t *bytes)
|
||||||
|
|||||||
@@ -106,6 +106,9 @@ public:
|
|||||||
::FLAC__StreamEncoderSeekStatus seek_callback(FLAC__uint64 absolute_byte_offset);
|
::FLAC__StreamEncoderSeekStatus seek_callback(FLAC__uint64 absolute_byte_offset);
|
||||||
::FLAC__StreamEncoderTellStatus tell_callback(FLAC__uint64 *absolute_byte_offset);
|
::FLAC__StreamEncoderTellStatus tell_callback(FLAC__uint64 *absolute_byte_offset);
|
||||||
void metadata_callback(const ::FLAC__StreamMetadata *metadata);
|
void metadata_callback(const ::FLAC__StreamMetadata *metadata);
|
||||||
|
private:
|
||||||
|
StreamEncoder(const StreamEncoder&);
|
||||||
|
StreamEncoder&operator=(const StreamEncoder&);
|
||||||
};
|
};
|
||||||
|
|
||||||
::FLAC__StreamEncoderReadStatus StreamEncoder::read_callback(FLAC__byte buffer[], size_t *bytes)
|
::FLAC__StreamEncoderReadStatus StreamEncoder::read_callback(FLAC__byte buffer[], size_t *bytes)
|
||||||
|
|||||||
Reference in New Issue
Block a user