tag/Handler: convert to class with virtual methods
This commit is contained in:
@@ -30,9 +30,9 @@
|
||||
#include <exception>
|
||||
|
||||
bool
|
||||
ScanGenericTags(InputStream &is, const TagHandler &handler, void *ctx)
|
||||
ScanGenericTags(InputStream &is, TagHandler &handler) noexcept
|
||||
{
|
||||
if (tag_ape_scan2(is, handler, ctx))
|
||||
if (tag_ape_scan2(is, handler))
|
||||
return true;
|
||||
|
||||
#ifdef ENABLE_ID3TAG
|
||||
@@ -42,19 +42,19 @@ ScanGenericTags(InputStream &is, const TagHandler &handler, void *ctx)
|
||||
return false;
|
||||
}
|
||||
|
||||
return tag_id3_scan(is, handler, ctx);
|
||||
return tag_id3_scan(is, handler);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
ScanGenericTags(Path path, const TagHandler &handler, void *ctx)
|
||||
ScanGenericTags(Path path, TagHandler &handler) noexcept
|
||||
try {
|
||||
Mutex mutex;
|
||||
|
||||
auto is = OpenLocalInputStream(path, mutex);
|
||||
return ScanGenericTags(*is, handler, ctx);
|
||||
return ScanGenericTags(*is, handler);
|
||||
} catch (...) {
|
||||
LogError(std::current_exception());
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user