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
6a314466
Commit
6a314466
authored
Dec 20, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/TimerEvent: add "noexcept"
parent
451fbbce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
TimerEvent.cxx
src/event/TimerEvent.cxx
+2
-2
TimerEvent.hxx
src/event/TimerEvent.hxx
+7
-7
No files found.
src/event/TimerEvent.cxx
View file @
6a314466
...
...
@@ -22,14 +22,14 @@
#include "Loop.hxx"
void
TimerEvent
::
Cancel
()
TimerEvent
::
Cancel
()
noexcept
{
if
(
IsActive
())
loop
.
CancelTimer
(
*
this
);
}
void
TimerEvent
::
Schedule
(
std
::
chrono
::
steady_clock
::
duration
d
)
TimerEvent
::
Schedule
(
std
::
chrono
::
steady_clock
::
duration
d
)
noexcept
{
Cancel
();
...
...
src/event/TimerEvent.hxx
View file @
6a314466
...
...
@@ -55,27 +55,27 @@ class TimerEvent final {
std
::
chrono
::
steady_clock
::
time_point
due
;
public
:
TimerEvent
(
EventLoop
&
_loop
,
Callback
_callback
)
TimerEvent
(
EventLoop
&
_loop
,
Callback
_callback
)
noexcept
:
loop
(
_loop
),
callback
(
_callback
)
{
}
~
TimerEvent
()
{
~
TimerEvent
()
noexcept
{
Cancel
();
}
EventLoop
&
GetEventLoop
()
{
EventLoop
&
GetEventLoop
()
noexcept
{
return
loop
;
}
bool
IsActive
()
const
{
bool
IsActive
()
const
noexcept
{
return
timer_set_hook
.
is_linked
();
}
void
Schedule
(
std
::
chrono
::
steady_clock
::
duration
d
);
void
Cancel
();
void
Schedule
(
std
::
chrono
::
steady_clock
::
duration
d
)
noexcept
;
void
Cancel
()
noexcept
;
private
:
void
Run
()
{
void
Run
()
noexcept
{
callback
();
}
};
...
...
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