fileref: Adapt formatting to TagLib code style

This commit is contained in:
Urs Fleisch 2022-02-27 07:03:36 +01:00
parent a7eb7735ee
commit e255e749e8
3 changed files with 12 additions and 9 deletions

View File

@ -89,9 +89,10 @@ namespace
{
for(ResolverList::ConstIterator it = fileTypeResolvers.begin();
it != fileTypeResolvers.end(); ++it) {
if (const FileRef::StreamTypeResolver* streamResolver =
dynamic_cast<const FileRef::StreamTypeResolver*>(*it)) {
if(File *file = streamResolver->createFileFromStream(stream, readAudioProperties, audioPropertiesStyle))
if(const FileRef::StreamTypeResolver *streamResolver =
dynamic_cast<const FileRef::StreamTypeResolver*>(*it)) {
if(File *file = streamResolver->createFileFromStream(
stream, readAudioProperties, audioPropertiesStyle))
return file;
}
}

View File

@ -110,12 +110,12 @@ namespace TagLib {
class TAGLIB_EXPORT StreamTypeResolver : public FileTypeResolver
{
TAGLIB_IGNORE_MISSING_DESTRUCTOR
public:
virtual File *createFileFromStream(IOStream* stream,
bool readAudioProperties = true,
AudioProperties::ReadStyle
audioPropertiesStyle = AudioProperties::Average) const = 0;
TAGLIB_IGNORE_MISSING_DESTRUCTOR
public:
virtual File *createFileFromStream(IOStream *stream,
bool readAudioProperties = true,
AudioProperties::ReadStyle
audioPropertiesStyle = AudioProperties::Average) const = 0;
};
/*!

View File

@ -60,6 +60,7 @@ namespace
return new Ogg::Vorbis::File(fileName);
}
};
class DummyStreamResolver : public FileRef::StreamTypeResolver
{
public:
@ -67,6 +68,7 @@ namespace
{
return 0;
}
virtual File *createFileFromStream(IOStream *s, bool, AudioProperties::ReadStyle) const
{
return new MP4::File(s);