diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-21 11:42:04 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-21 11:53:42 +0100 |
commit | 1e9da09f62c1b4bde9848fbaa706b2fbe94d8aab (patch) | |
tree | 6d3c2521c03564266c65d9e314ca13564b980df7 /src | |
parent | 5caf351c446237ecfa5bf5e8b00dcb0d9a0322a1 (diff) |
TagFile: add "noexcept"
Diffstat (limited to 'src')
-rw-r--r-- | src/TagFile.cxx | 13 | ||||
-rw-r--r-- | src/TagFile.hxx | 5 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/TagFile.cxx b/src/TagFile.cxx index 02ac42005..e28c90d50 100644 --- a/src/TagFile.cxx +++ b/src/TagFile.cxx @@ -46,16 +46,16 @@ class TagFileScan { public: TagFileScan(Path _path_fs, const char *_suffix, - const TagHandler &_handler, void *_handler_ctx) + const TagHandler &_handler, void *_handler_ctx) noexcept :path_fs(_path_fs), suffix(_suffix), handler(_handler), handler_ctx(_handler_ctx) , is(nullptr) {} - bool ScanFile(const DecoderPlugin &plugin) { + bool ScanFile(const DecoderPlugin &plugin) noexcept { return plugin.ScanFile(path_fs, handler, handler_ctx); } - bool ScanStream(const DecoderPlugin &plugin) { + bool ScanStream(const DecoderPlugin &plugin) noexcept { if (plugin.scan_stream == nullptr) return false; @@ -78,14 +78,15 @@ public: return plugin.ScanStream(*is, handler, handler_ctx); } - bool Scan(const DecoderPlugin &plugin) { + bool Scan(const DecoderPlugin &plugin) noexcept { return plugin.SupportsSuffix(suffix) && (ScanFile(plugin) || ScanStream(plugin)); } }; bool -tag_file_scan(Path path_fs, const TagHandler &handler, void *handler_ctx) +tag_file_scan(Path path_fs, + const TagHandler &handler, void *handler_ctx) noexcept { assert(!path_fs.IsNull()); @@ -104,7 +105,7 @@ tag_file_scan(Path path_fs, const TagHandler &handler, void *handler_ctx) } bool -tag_file_scan(Path path, TagBuilder &builder) +tag_file_scan(Path path, TagBuilder &builder) noexcept { if (!tag_file_scan(path, full_tag_handler, &builder)) return false; diff --git a/src/TagFile.hxx b/src/TagFile.hxx index c5673cb64..851cc9633 100644 --- a/src/TagFile.hxx +++ b/src/TagFile.hxx @@ -34,7 +34,8 @@ class TagBuilder; * found) */ bool -tag_file_scan(Path path, const TagHandler &handler, void *handler_ctx); +tag_file_scan(Path path, + const TagHandler &handler, void *handler_ctx) noexcept; /** * Scan the tags of a song file. Invokes matching decoder plugins, @@ -45,6 +46,6 @@ tag_file_scan(Path path, const TagHandler &handler, void *handler_ctx); * found) */ bool -tag_file_scan(Path path, TagBuilder &builder); +tag_file_scan(Path path, TagBuilder &builder) noexcept; #endif |