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
3326c87a
Commit
3326c87a
authored
Jan 21, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/Count: add "noexcept"
parent
0ec1863f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Count.cxx
src/db/Count.cxx
+6
-5
No files found.
src/db/Count.cxx
View file @
3326c87a
...
@@ -42,7 +42,7 @@ class TagCountMap : public std::map<std::string, SearchStats> {
...
@@ -42,7 +42,7 @@ class TagCountMap : public std::map<std::string, SearchStats> {
};
};
static
void
static
void
PrintSearchStats
(
Response
&
r
,
const
SearchStats
&
stats
)
PrintSearchStats
(
Response
&
r
,
const
SearchStats
&
stats
)
noexcept
{
{
unsigned
total_duration_s
=
unsigned
total_duration_s
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
seconds
>
(
stats
.
total_duration
).
count
();
std
::
chrono
::
duration_cast
<
std
::
chrono
::
seconds
>
(
stats
.
total_duration
).
count
();
...
@@ -53,7 +53,7 @@ PrintSearchStats(Response &r, const SearchStats &stats)
...
@@ -53,7 +53,7 @@ PrintSearchStats(Response &r, const SearchStats &stats)
}
}
static
void
static
void
Print
(
Response
&
r
,
TagType
group
,
const
TagCountMap
&
m
)
Print
(
Response
&
r
,
TagType
group
,
const
TagCountMap
&
m
)
noexcept
{
{
assert
(
unsigned
(
group
)
<
TAG_NUM_OF_ITEM_TYPES
);
assert
(
unsigned
(
group
)
<
TAG_NUM_OF_ITEM_TYPES
);
...
@@ -64,7 +64,7 @@ Print(Response &r, TagType group, const TagCountMap &m)
...
@@ -64,7 +64,7 @@ Print(Response &r, TagType group, const TagCountMap &m)
}
}
static
void
static
void
stats_visitor_song
(
SearchStats
&
stats
,
const
LightSong
&
song
)
stats_visitor_song
(
SearchStats
&
stats
,
const
LightSong
&
song
)
noexcept
{
{
stats
.
n_songs
++
;
stats
.
n_songs
++
;
...
@@ -74,7 +74,7 @@ stats_visitor_song(SearchStats &stats, const LightSong &song)
...
@@ -74,7 +74,7 @@ stats_visitor_song(SearchStats &stats, const LightSong &song)
}
}
static
bool
static
bool
CollectGroupCounts
(
TagCountMap
&
map
,
TagType
group
,
const
Tag
&
tag
)
CollectGroupCounts
(
TagCountMap
&
map
,
TagType
group
,
const
Tag
&
tag
)
noexcept
{
{
bool
found
=
false
;
bool
found
=
false
;
for
(
const
auto
&
item
:
tag
)
{
for
(
const
auto
&
item
:
tag
)
{
...
@@ -94,7 +94,8 @@ CollectGroupCounts(TagCountMap &map, TagType group, const Tag &tag)
...
@@ -94,7 +94,8 @@ CollectGroupCounts(TagCountMap &map, TagType group, const Tag &tag)
}
}
static
void
static
void
GroupCountVisitor
(
TagCountMap
&
map
,
TagType
group
,
const
LightSong
&
song
)
GroupCountVisitor
(
TagCountMap
&
map
,
TagType
group
,
const
LightSong
&
song
)
noexcept
{
{
assert
(
song
.
tag
!=
nullptr
);
assert
(
song
.
tag
!=
nullptr
);
...
...
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