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
81d0c04e
Commit
81d0c04e
authored
Feb 18, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
song/DetachedSong: add `noexcept`
parent
0924b63e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
DetachedSong.cxx
src/song/DetachedSong.cxx
+1
-1
DetachedSong.hxx
src/song/DetachedSong.hxx
+18
-18
No files found.
src/song/DetachedSong.cxx
View file @
81d0c04e
...
...
@@ -22,7 +22,7 @@
#include "util/UriExtract.hxx"
#include "fs/Traits.hxx"
DetachedSong
::
DetachedSong
(
const
LightSong
&
other
)
DetachedSong
::
DetachedSong
(
const
LightSong
&
other
)
noexcept
:
uri
(
other
.
GetURI
()),
real_uri
(
other
.
real_uri
!=
nullptr
?
other
.
real_uri
:
""
),
tag
(
other
.
tag
),
...
...
src/song/DetachedSong.hxx
View file @
81d0c04e
...
...
@@ -80,17 +80,17 @@ class DetachedSong {
SongTime
end_time
=
SongTime
::
zero
();
public
:
explicit
DetachedSong
(
const
char
*
_uri
)
explicit
DetachedSong
(
const
char
*
_uri
)
noexcept
:
uri
(
_uri
)
{}
explicit
DetachedSong
(
const
std
::
string
&
_uri
)
explicit
DetachedSong
(
const
std
::
string
&
_uri
)
noexcept
:
uri
(
_uri
)
{}
explicit
DetachedSong
(
std
::
string
&&
_uri
)
explicit
DetachedSong
(
std
::
string
&&
_uri
)
noexcept
:
uri
(
std
::
move
(
_uri
))
{}
template
<
typename
U
>
DetachedSong
(
U
&&
_uri
,
Tag
&&
_tag
)
DetachedSong
(
U
&&
_uri
,
Tag
&&
_tag
)
noexcept
:
uri
(
std
::
forward
<
U
>
(
_uri
)),
tag
(
std
::
move
(
_tag
))
{}
...
...
@@ -99,10 +99,10 @@ public:
* call DatabaseDetachSong() instead, which initializes
* #real_uri properly using Storage::MapUTF8().
*/
explicit
DetachedSong
(
const
LightSong
&
other
);
explicit
DetachedSong
(
const
LightSong
&
other
)
noexcept
;
gcc_noinline
~
DetachedSong
()
=
default
;
~
DetachedSong
()
noexcept
=
default
;
/* these are declared because the user-defined destructor
above prevents them from being generated implicitly */
...
...
@@ -119,7 +119,7 @@ public:
}
template
<
typename
T
>
void
SetURI
(
T
&&
_uri
)
{
void
SetURI
(
T
&&
_uri
)
noexcept
{
uri
=
std
::
forward
<
T
>
(
_uri
);
}
...
...
@@ -142,7 +142,7 @@ public:
}
template
<
typename
T
>
void
SetRealURI
(
T
&&
_uri
)
{
void
SetRealURI
(
T
&&
_uri
)
noexcept
{
real_uri
=
std
::
forward
<
T
>
(
_uri
);
}
...
...
@@ -184,15 +184,15 @@ public:
return
tag
;
}
void
SetTag
(
const
Tag
&
_tag
)
{
void
SetTag
(
const
Tag
&
_tag
)
noexcept
{
tag
=
Tag
(
_tag
);
}
void
SetTag
(
Tag
&&
_tag
)
{
void
SetTag
(
Tag
&&
_tag
)
noexcept
{
tag
=
std
::
move
(
_tag
);
}
void
MoveTagFrom
(
DetachedSong
&&
other
)
{
void
MoveTagFrom
(
DetachedSong
&&
other
)
noexcept
{
tag
=
std
::
move
(
other
.
tag
);
}
...
...
@@ -200,31 +200,31 @@ public:
* Similar to the MoveTagFrom(), but move only the #TagItem
* array.
*/
void
MoveTagItemsFrom
(
DetachedSong
&&
other
)
{
void
MoveTagItemsFrom
(
DetachedSong
&&
other
)
noexcept
{
tag
.
MoveItemsFrom
(
std
::
move
(
other
.
tag
));
}
std
::
chrono
::
system_clock
::
time_point
GetLastModified
()
const
{
std
::
chrono
::
system_clock
::
time_point
GetLastModified
()
const
noexcept
{
return
mtime
;
}
void
SetLastModified
(
std
::
chrono
::
system_clock
::
time_point
_value
)
{
void
SetLastModified
(
std
::
chrono
::
system_clock
::
time_point
_value
)
noexcept
{
mtime
=
_value
;
}
SongTime
GetStartTime
()
const
{
SongTime
GetStartTime
()
const
noexcept
{
return
start_time
;
}
void
SetStartTime
(
SongTime
_value
)
{
void
SetStartTime
(
SongTime
_value
)
noexcept
{
start_time
=
_value
;
}
SongTime
GetEndTime
()
const
{
SongTime
GetEndTime
()
const
noexcept
{
return
end_time
;
}
void
SetEndTime
(
SongTime
_value
)
{
void
SetEndTime
(
SongTime
_value
)
noexcept
{
end_time
=
_value
;
}
...
...
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