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
53ffcf45
Commit
53ffcf45
authored
3 years ago
by
Rosen Penev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make several member functions const
Signed-off-by:
Rosen Penev
<
rosenp@gmail.com
>
parent
9ca64d5f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
15 deletions
+15
-15
Instance.hxx
src/Instance.hxx
+1
-1
DecoderPlugin.hxx
src/decoder/DecoderPlugin.hxx
+5
-5
Manager.cxx
src/input/cache/Manager.cxx
+1
-1
Manager.hxx
src/input/cache/Manager.hxx
+1
-1
SharedPipeConsumer.hxx
src/output/SharedPipeConsumer.hxx
+1
-1
PlaylistPlugin.hxx
src/playlist/PlaylistPlugin.hxx
+5
-5
OptionParser.hxx
src/util/OptionParser.hxx
+1
-1
No files found.
src/Instance.hxx
View file @
53ffcf45
...
@@ -194,7 +194,7 @@ struct Instance final
...
@@ -194,7 +194,7 @@ struct Instance final
#endif
#endif
#ifdef ENABLE_SQLITE
#ifdef ENABLE_SQLITE
bool
HasStickerDatabase
()
noexcept
{
bool
HasStickerDatabase
()
const
noexcept
{
return
sticker_database
!=
nullptr
;
return
sticker_database
!=
nullptr
;
}
}
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
src/decoder/DecoderPlugin.hxx
View file @
53ffcf45
...
@@ -143,34 +143,34 @@ struct DecoderPlugin {
...
@@ -143,34 +143,34 @@ struct DecoderPlugin {
scan_stream
(
_scan_stream
)
{}
scan_stream
(
_scan_stream
)
{}
constexpr
auto
WithInit
(
bool
(
*
_init
)(
const
ConfigBlock
&
block
),
constexpr
auto
WithInit
(
bool
(
*
_init
)(
const
ConfigBlock
&
block
),
void
(
*
_finish
)()
noexcept
=
nullptr
)
noexcept
{
void
(
*
_finish
)()
noexcept
=
nullptr
)
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
init
=
_init
;
copy
.
init
=
_init
;
copy
.
finish
=
_finish
;
copy
.
finish
=
_finish
;
return
copy
;
return
copy
;
}
}
constexpr
auto
WithContainer
(
std
::
forward_list
<
DetachedSong
>
(
*
_container_scan
)(
Path
path_fs
))
noexcept
{
constexpr
auto
WithContainer
(
std
::
forward_list
<
DetachedSong
>
(
*
_container_scan
)(
Path
path_fs
))
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
container_scan
=
_container_scan
;
copy
.
container_scan
=
_container_scan
;
return
copy
;
return
copy
;
}
}
constexpr
auto
WithProtocols
(
std
::
set
<
std
::
string
>
(
*
_protocols
)()
noexcept
,
constexpr
auto
WithProtocols
(
std
::
set
<
std
::
string
>
(
*
_protocols
)()
noexcept
,
void
(
*
_uri_decode
)(
DecoderClient
&
client
,
const
char
*
uri
))
noexcept
{
void
(
*
_uri_decode
)(
DecoderClient
&
client
,
const
char
*
uri
))
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
protocols
=
_protocols
;
copy
.
protocols
=
_protocols
;
copy
.
uri_decode
=
_uri_decode
;
copy
.
uri_decode
=
_uri_decode
;
return
copy
;
return
copy
;
}
}
constexpr
auto
WithSuffixes
(
const
char
*
const
*
_suffixes
)
noexcept
{
constexpr
auto
WithSuffixes
(
const
char
*
const
*
_suffixes
)
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
suffixes
=
_suffixes
;
copy
.
suffixes
=
_suffixes
;
return
copy
;
return
copy
;
}
}
constexpr
auto
WithMimeTypes
(
const
char
*
const
*
_mime_types
)
noexcept
{
constexpr
auto
WithMimeTypes
(
const
char
*
const
*
_mime_types
)
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
mime_types
=
_mime_types
;
copy
.
mime_types
=
_mime_types
;
return
copy
;
return
copy
;
...
...
This diff is collapsed.
Click to expand it.
src/input/cache/Manager.cxx
View file @
53ffcf45
...
@@ -75,7 +75,7 @@ InputCacheManager::Flush() noexcept
...
@@ -75,7 +75,7 @@ InputCacheManager::Flush() noexcept
}
}
bool
bool
InputCacheManager
::
IsEligible
(
const
InputStream
&
input
)
noexcept
InputCacheManager
::
IsEligible
(
const
InputStream
&
input
)
const
noexcept
{
{
assert
(
input
.
IsReady
());
assert
(
input
.
IsReady
());
...
...
This diff is collapsed.
Click to expand it.
src/input/cache/Manager.hxx
View file @
53ffcf45
...
@@ -98,7 +98,7 @@ private:
...
@@ -98,7 +98,7 @@ private:
* Check whether the given #InputStream can be stored in this
* Check whether the given #InputStream can be stored in this
* cache.
* cache.
*/
*/
bool
IsEligible
(
const
InputStream
&
input
)
noexcept
;
bool
IsEligible
(
const
InputStream
&
input
)
const
noexcept
;
void
Remove
(
InputCacheItem
&
item
)
noexcept
;
void
Remove
(
InputCacheItem
&
item
)
noexcept
;
void
Delete
(
InputCacheItem
*
item
)
noexcept
;
void
Delete
(
InputCacheItem
*
item
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/output/SharedPipeConsumer.hxx
View file @
53ffcf45
...
@@ -66,7 +66,7 @@ public:
...
@@ -66,7 +66,7 @@ public:
return
*
pipe
;
return
*
pipe
;
}
}
bool
IsInitial
()
{
bool
IsInitial
()
const
{
return
chunk
==
nullptr
;
return
chunk
==
nullptr
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/playlist/PlaylistPlugin.hxx
View file @
53ffcf45
...
@@ -85,32 +85,32 @@ struct PlaylistPlugin {
...
@@ -85,32 +85,32 @@ struct PlaylistPlugin {
:
name
(
_name
),
open_stream
(
_open_stream
)
{}
:
name
(
_name
),
open_stream
(
_open_stream
)
{}
constexpr
auto
WithInit
(
bool
(
*
_init
)(
const
ConfigBlock
&
block
),
constexpr
auto
WithInit
(
bool
(
*
_init
)(
const
ConfigBlock
&
block
),
void
(
*
_finish
)()
noexcept
=
nullptr
)
noexcept
{
void
(
*
_finish
)()
noexcept
=
nullptr
)
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
init
=
_init
;
copy
.
init
=
_init
;
copy
.
finish
=
_finish
;
copy
.
finish
=
_finish
;
return
copy
;
return
copy
;
}
}
constexpr
auto
WithSchemes
(
const
char
*
const
*
_schemes
)
noexcept
{
constexpr
auto
WithSchemes
(
const
char
*
const
*
_schemes
)
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
schemes
=
_schemes
;
copy
.
schemes
=
_schemes
;
return
copy
;
return
copy
;
}
}
constexpr
auto
WithSuffixes
(
const
char
*
const
*
_suffixes
)
noexcept
{
constexpr
auto
WithSuffixes
(
const
char
*
const
*
_suffixes
)
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
suffixes
=
_suffixes
;
copy
.
suffixes
=
_suffixes
;
return
copy
;
return
copy
;
}
}
constexpr
auto
WithMimeTypes
(
const
char
*
const
*
_mime_types
)
noexcept
{
constexpr
auto
WithMimeTypes
(
const
char
*
const
*
_mime_types
)
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
mime_types
=
_mime_types
;
copy
.
mime_types
=
_mime_types
;
return
copy
;
return
copy
;
}
}
constexpr
auto
WithAsFolder
(
bool
value
=
true
)
noexcept
{
constexpr
auto
WithAsFolder
(
bool
value
=
true
)
const
noexcept
{
auto
copy
=
*
this
;
auto
copy
=
*
this
;
copy
.
as_folder
=
value
;
copy
.
as_folder
=
value
;
return
copy
;
return
copy
;
...
...
This diff is collapsed.
Click to expand it.
src/util/OptionParser.hxx
View file @
53ffcf45
...
@@ -49,7 +49,7 @@ public:
...
@@ -49,7 +49,7 @@ public:
int
index
;
int
index
;
const
char
*
value
;
const
char
*
value
;
constexpr
operator
bool
()
noexcept
{
constexpr
operator
bool
()
const
noexcept
{
return
index
>=
0
;
return
index
>=
0
;
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
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