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
43677d57
Commit
43677d57
authored
Apr 04, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/MaskMonitor: add `noexcept`
parent
693815bb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
MaskMonitor.cxx
src/event/MaskMonitor.cxx
+2
-2
MaskMonitor.hxx
src/event/MaskMonitor.hxx
+4
-4
No files found.
src/event/MaskMonitor.cxx
View file @
43677d57
/*
* Copyright 2003-201
8
The Music Player Daemon Project
* Copyright 2003-201
9
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -20,7 +20,7 @@
#include "MaskMonitor.hxx"
void
MaskMonitor
::
OrMask
(
unsigned
new_mask
)
MaskMonitor
::
OrMask
(
unsigned
new_mask
)
noexcept
{
if
(
pending_mask
.
fetch_or
(
new_mask
)
==
0
)
defer
.
Schedule
();
...
...
src/event/MaskMonitor.hxx
View file @
43677d57
...
...
@@ -40,19 +40,19 @@ class MaskMonitor final {
std
::
atomic_uint
pending_mask
;
public
:
MaskMonitor
(
EventLoop
&
_loop
,
Callback
_callback
)
MaskMonitor
(
EventLoop
&
_loop
,
Callback
_callback
)
noexcept
:
defer
(
_loop
,
BIND_THIS_METHOD
(
RunDeferred
)),
callback
(
_callback
),
pending_mask
(
0
)
{}
EventLoop
&
GetEventLoop
()
{
EventLoop
&
GetEventLoop
()
noexcept
{
return
defer
.
GetEventLoop
();
}
void
Cancel
()
{
void
Cancel
()
noexcept
{
defer
.
Cancel
();
}
void
OrMask
(
unsigned
new_mask
);
void
OrMask
(
unsigned
new_mask
)
noexcept
;
protected
:
/* DeferEvent 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