Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
fd1826cb
Commit
fd1826cb
authored
Sep 03, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/update/Container: move SupportsContainerSuffix() to struct DecoderPlugin
parent
d5681b67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
Container.cxx
src/db/update/Container.cxx
+1
-9
DecoderPlugin.hxx
src/decoder/DecoderPlugin.hxx
+4
-0
No files found.
src/db/update/Container.cxx
View file @
fd1826cb
...
@@ -55,21 +55,13 @@ UpdateWalk::MakeDirectoryIfModified(Directory &parent, const char *name,
...
@@ -55,21 +55,13 @@ UpdateWalk::MakeDirectoryIfModified(Directory &parent, const char *name,
return
directory
;
return
directory
;
}
}
static
bool
SupportsContainerSuffix
(
const
DecoderPlugin
&
plugin
,
const
char
*
suffix
)
noexcept
{
return
plugin
.
container_scan
!=
nullptr
&&
plugin
.
SupportsSuffix
(
suffix
);
}
bool
bool
UpdateWalk
::
UpdateContainerFile
(
Directory
&
directory
,
UpdateWalk
::
UpdateContainerFile
(
Directory
&
directory
,
const
char
*
name
,
const
char
*
suffix
,
const
char
*
name
,
const
char
*
suffix
,
const
StorageFileInfo
&
info
)
noexcept
const
StorageFileInfo
&
info
)
noexcept
{
{
const
DecoderPlugin
*
_plugin
=
decoder_plugins_find
([
suffix
](
const
DecoderPlugin
&
plugin
){
const
DecoderPlugin
*
_plugin
=
decoder_plugins_find
([
suffix
](
const
DecoderPlugin
&
plugin
){
return
SupportsContainerSuffix
(
plugin
,
suffix
);
return
plugin
.
SupportsContainerSuffix
(
suffix
);
});
});
if
(
_plugin
==
nullptr
)
if
(
_plugin
==
nullptr
)
return
false
;
return
false
;
...
...
src/decoder/DecoderPlugin.hxx
View file @
fd1826cb
...
@@ -225,6 +225,10 @@ struct DecoderPlugin {
...
@@ -225,6 +225,10 @@ struct DecoderPlugin {
*/
*/
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
bool
SupportsMimeType
(
const
char
*
mime_type
)
const
noexcept
;
bool
SupportsMimeType
(
const
char
*
mime_type
)
const
noexcept
;
bool
SupportsContainerSuffix
(
const
char
*
suffix
)
const
noexcept
{
return
container_scan
!=
nullptr
&&
SupportsSuffix
(
suffix
);
}
};
};
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment