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
018c5ef7
Commit
018c5ef7
authored
8 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/Loop: use C++11 initializers
parent
fdb136f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
Loop.cxx
src/event/Loop.cxx
+1
-6
Loop.hxx
src/event/Loop.hxx
+4
-4
No files found.
src/event/Loop.cxx
View file @
018c5ef7
...
@@ -30,12 +30,7 @@
...
@@ -30,12 +30,7 @@
EventLoop
::
EventLoop
()
EventLoop
::
EventLoop
()
:
SocketMonitor
(
*
this
),
:
SocketMonitor
(
*
this
),
now_ms
(
::
MonotonicClockMS
()),
now_ms
(
::
MonotonicClockMS
())
quit
(
false
),
busy
(
true
),
#ifndef NDEBUG
virgin
(
true
),
#endif
thread
(
ThreadId
::
Null
())
{
{
SocketMonitor
::
Open
(
wake_fd
.
Get
());
SocketMonitor
::
Open
(
wake_fd
.
Get
());
SocketMonitor
::
Schedule
(
SocketMonitor
::
READ
);
SocketMonitor
::
Schedule
(
SocketMonitor
::
READ
);
...
...
This diff is collapsed.
Click to expand it.
src/event/Loop.hxx
View file @
018c5ef7
...
@@ -81,7 +81,7 @@ class EventLoop final : SocketMonitor
...
@@ -81,7 +81,7 @@ class EventLoop final : SocketMonitor
unsigned
now_ms
;
unsigned
now_ms
;
bool
quit
;
bool
quit
=
false
;
/**
/**
* True when the object has been modified and another check is
* True when the object has been modified and another check is
...
@@ -95,14 +95,14 @@ class EventLoop final : SocketMonitor
...
@@ -95,14 +95,14 @@ class EventLoop final : SocketMonitor
*
*
* Protected with #mutex.
* Protected with #mutex.
*/
*/
bool
busy
;
bool
busy
=
true
;
#ifndef NDEBUG
#ifndef NDEBUG
/**
/**
* True if Run() was never called. This is used for assert()
* True if Run() was never called. This is used for assert()
* calls.
* calls.
*/
*/
bool
virgin
;
bool
virgin
=
true
;
#endif
#endif
PollGroup
poll_group
;
PollGroup
poll_group
;
...
@@ -111,7 +111,7 @@ class EventLoop final : SocketMonitor
...
@@ -111,7 +111,7 @@ class EventLoop final : SocketMonitor
/**
/**
* A reference to the thread that is currently inside Run().
* A reference to the thread that is currently inside Run().
*/
*/
ThreadId
thread
;
ThreadId
thread
=
ThreadId
::
Null
()
;
public
:
public
:
EventLoop
();
EventLoop
();
...
...
This diff is collapsed.
Click to expand it.
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