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
30e3ef4c
Commit
30e3ef4c
authored
Sep 26, 2020
by
Rosen Penev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
constexpr/std::array conversions
Signed-off-by:
Rosen Penev
<
rosenp@gmail.com
>
parent
46600931
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
23 deletions
+23
-23
IdleFlags.cxx
src/IdleFlags.cxx
+2
-2
Bzip2ArchivePlugin.cxx
src/archive/plugins/Bzip2ArchivePlugin.cxx
+1
-1
Iso9660ArchivePlugin.cxx
src/archive/plugins/Iso9660ArchivePlugin.cxx
+1
-1
ZzipArchivePlugin.cxx
src/archive/plugins/ZzipArchivePlugin.cxx
+1
-1
FileCommands.cxx
src/command/FileCommands.cxx
+3
-3
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+2
-2
FlacPlaylistPlugin.cxx
src/playlist/plugins/FlacPlaylistPlugin.cxx
+1
-1
PlsPlaylistPlugin.cxx
src/playlist/plugins/PlsPlaylistPlugin.cxx
+2
-2
RssPlaylistPlugin.cxx
src/playlist/plugins/RssPlaylistPlugin.cxx
+2
-2
XspfPlaylistPlugin.cxx
src/playlist/plugins/XspfPlaylistPlugin.cxx
+2
-2
Database.cxx
src/sticker/Database.cxx
+6
-6
No files found.
src/IdleFlags.cxx
View file @
30e3ef4c
...
...
@@ -27,7 +27,7 @@
#include <cassert>
static
const
char
*
const
idle_names
[]
=
{
static
const
expr
const
char
*
idle_names
[]
=
{
"database"
,
"stored_playlist"
,
"playlist"
,
...
...
@@ -42,7 +42,7 @@ static const char *const idle_names[] = {
"neighbor"
,
"mount"
,
"partition"
,
nullptr
nullptr
,
};
const
char
*
const
*
...
...
src/archive/plugins/Bzip2ArchivePlugin.cxx
View file @
30e3ef4c
...
...
@@ -180,7 +180,7 @@ Bzip2InputStream::IsEOF() const noexcept
/* exported structures */
static
const
char
*
const
bz2_extensions
[]
=
{
static
const
expr
const
char
*
bz2_extensions
[]
=
{
"bz2"
,
nullptr
};
...
...
src/archive/plugins/Iso9660ArchivePlugin.cxx
View file @
30e3ef4c
...
...
@@ -319,7 +319,7 @@ Iso9660InputStream::IsEOF() const noexcept
/* exported structures */
static
const
char
*
const
iso9660_archive_extensions
[]
=
{
static
const
expr
const
char
*
iso9660_archive_extensions
[]
=
{
"iso"
,
nullptr
};
...
...
src/archive/plugins/ZzipArchivePlugin.cxx
View file @
30e3ef4c
...
...
@@ -188,7 +188,7 @@ ZzipInputStream::Seek(std::unique_lock<Mutex> &, offset_type new_offset)
/* exported structures */
static
const
char
*
const
zzip_archive_extensions
[]
=
{
static
const
expr
const
char
*
zzip_archive_extensions
[]
=
{
"zip"
,
nullptr
};
...
...
src/command/FileCommands.cxx
View file @
30e3ef4c
...
...
@@ -156,14 +156,14 @@ handle_read_comments(Client &client, Request args, Response &r)
static
InputStreamPtr
find_stream_art
(
std
::
string_view
directory
,
Mutex
&
mutex
)
{
static
constexpr
char
const
*
art_names
[]
=
{
static
constexpr
auto
art_names
=
std
::
array
{
"cover.png"
,
"cover.jpg"
,
"cover.tiff"
,
"cover.bmp"
"cover.bmp"
,
};
for
(
const
auto
name
:
art_names
)
{
for
(
const
auto
name
:
art_names
)
{
std
::
string
art_file
=
PathTraitsUTF8
::
Build
(
directory
,
name
);
try
{
...
...
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
30e3ef4c
...
...
@@ -632,12 +632,12 @@ wavpack_scan_stream(InputStream &is, TagHandler &handler)
return
true
;
}
static
c
har
const
*
const
wavpack_suffixes
[]
=
{
static
c
onstexpr
const
char
*
wavpack_suffixes
[]
=
{
"wv"
,
nullptr
};
static
c
har
const
*
const
wavpack_mime_types
[]
=
{
static
c
onstexpr
const
char
*
wavpack_mime_types
[]
=
{
"audio/x-wavpack"
,
nullptr
};
...
...
src/playlist/plugins/FlacPlaylistPlugin.cxx
View file @
30e3ef4c
...
...
@@ -98,7 +98,7 @@ flac_playlist_open_stream(InputStreamPtr &&is)
return
nullptr
;
}
static
const
char
*
const
flac_playlist_suffixes
[]
=
{
static
const
expr
const
char
*
flac_playlist_suffixes
[]
=
{
"flac"
,
nullptr
};
...
...
src/playlist/plugins/PlsPlaylistPlugin.cxx
View file @
30e3ef4c
...
...
@@ -162,12 +162,12 @@ pls_open_stream(InputStreamPtr &&is)
return
std
::
make_unique
<
MemorySongEnumerator
>
(
std
::
move
(
songs
));
}
static
const
char
*
const
pls_suffixes
[]
=
{
static
const
expr
const
char
*
pls_suffixes
[]
=
{
"pls"
,
nullptr
};
static
const
char
*
const
pls_mime_types
[]
=
{
static
const
expr
const
char
*
pls_mime_types
[]
=
{
"audio/x-scpls"
,
nullptr
};
...
...
src/playlist/plugins/RssPlaylistPlugin.cxx
View file @
30e3ef4c
...
...
@@ -153,12 +153,12 @@ rss_open_stream(InputStreamPtr &&is)
return
std
::
make_unique
<
MemorySongEnumerator
>
(
std
::
move
(
parser
.
songs
));
}
static
const
char
*
const
rss_suffixes
[]
=
{
static
const
expr
const
char
*
rss_suffixes
[]
=
{
"rss"
,
nullptr
};
static
const
char
*
const
rss_mime_types
[]
=
{
static
const
expr
const
char
*
rss_mime_types
[]
=
{
"application/rss+xml"
,
"application/xml"
,
"text/xml"
,
...
...
src/playlist/plugins/XspfPlaylistPlugin.cxx
View file @
30e3ef4c
...
...
@@ -213,12 +213,12 @@ xspf_open_stream(InputStreamPtr &&is)
return
std
::
make_unique
<
MemorySongEnumerator
>
(
std
::
move
(
parser
.
songs
));
}
static
const
char
*
const
xspf_suffixes
[]
=
{
static
const
expr
const
char
*
xspf_suffixes
[]
=
{
"xspf"
,
nullptr
};
static
const
char
*
const
xspf_mime_types
[]
=
{
static
const
expr
const
char
*
xspf_mime_types
[]
=
{
"application/xspf+xml"
,
nullptr
};
...
...
src/sticker/Database.cxx
View file @
30e3ef4c
...
...
@@ -45,7 +45,7 @@ enum sticker_sql {
STICKER_SQL_COUNT
};
static
const
char
*
const
sticker_sql
[]
=
{
static
const
expr
auto
sticker_sql
=
std
::
array
{
//[STICKER_SQL_GET] =
"SELECT value FROM sticker WHERE type=? AND uri=? AND name=?"
,
//[STICKER_SQL_LIST] =
...
...
@@ -71,7 +71,7 @@ static const char *const sticker_sql[] = {
"SELECT uri,value FROM sticker WHERE type=? AND uri LIKE (? || '%') AND name=? AND value>?"
,
};
static
const
char
sticker_sql_create
[]
=
static
const
expr
const
char
sticker_sql_create
[]
=
"CREATE TABLE IF NOT EXISTS sticker("
" type VARCHAR NOT NULL, "
" uri VARCHAR NOT NULL, "
...
...
@@ -99,7 +99,7 @@ StickerDatabase::StickerDatabase(Path path)
/* prepare the statements we're going to use */
for
(
unsigned
i
=
0
;
i
<
std
::
size
(
sticker_sql
);
++
i
)
{
for
(
size_t
i
=
0
;
i
<
sticker_sql
.
size
(
);
++
i
)
{
assert
(
sticker_sql
[
i
]
!=
nullptr
);
stmt
[
i
]
=
Prepare
(
db
,
sticker_sql
[
i
]);
...
...
@@ -110,10 +110,10 @@ StickerDatabase::~StickerDatabase() noexcept
{
assert
(
db
!=
nullptr
);
for
(
unsigned
i
=
0
;
i
<
std
::
size
(
stmt
);
++
i
)
{
assert
(
st
mt
[
i
]
!=
nullptr
);
for
(
const
auto
&
sticker
:
stmt
)
{
assert
(
st
icker
!=
nullptr
);
sqlite3_finalize
(
st
mt
[
i
]
);
sqlite3_finalize
(
st
icker
);
}
}
...
...
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