Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
2c854cc8
Commit
2c854cc8
authored
Dec 03, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed gcc shadow warnings
parent
df898267
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
include/spdlog/details/async_log_helper.h
include/spdlog/details/async_log_helper.h
+4
-4
include/spdlog/details/mpcs_q.h
include/spdlog/details/mpcs_q.h
+7
-7
No files found.
include/spdlog/details/async_log_helper.h
View file @
2c854cc8
...
...
@@ -87,7 +87,7 @@ class async_log_helper
public:
using
q_type
=
details
::
mpsc_q
<
std
::
unique_ptr
<
async_msg
>
>
;
using
clock
=
std
::
chrono
::
monotonic
_clock
;
using
clock
=
std
::
chrono
::
steady
_clock
;
explicit
async_log_helper
(
size_t
max_queue_size
);
...
...
@@ -175,16 +175,16 @@ inline void spdlog::details::async_log_helper::_thread_loop()
clock
::
time_point
last_pop
=
clock
::
now
();
while
(
_active
)
{
q_type
::
item_type
async
_msg
;
q_type
::
item_type
popped
_msg
;
if
(
_q
.
pop
(
async
_msg
))
if
(
_q
.
pop
(
popped
_msg
))
{
last_pop
=
clock
::
now
();
try
{
details
::
log_msg
log_msg
=
async
_msg
->
to_log_msg
();
details
::
log_msg
log_msg
=
popped
_msg
->
to_log_msg
();
_formatter
->
format
(
log_msg
);
for
(
auto
&
s
:
_sinks
)
...
...
include/spdlog/details/mpcs_q.h
View file @
2c854cc8
...
...
@@ -89,11 +89,11 @@ public:
}
template
<
typename
TT
>
bool
push
(
TT
&&
val
ue
)
bool
push
(
TT
&&
val
)
{
if
(
_size
>=
_max_size
)
return
false
;
mpscq_node_t
*
new_node
=
new
mpscq_node_t
(
std
::
forward
<
TT
>
(
val
ue
));
mpscq_node_t
*
new_node
=
new
mpscq_node_t
(
std
::
forward
<
TT
>
(
val
));
push_node
(
new_node
);
++
_size
;
return
true
;
...
...
@@ -143,13 +143,13 @@ private:
mpscq_node_t
(
const
mpscq_node_t
&
)
=
delete
;
mpscq_node_t
&
operator
=
(
const
mpscq_node_t
&
)
=
delete
;
explicit
mpscq_node_t
(
const
T
&
val
ue
)
:
explicit
mpscq_node_t
(
const
T
&
val
)
:
next
(
nullptr
),
value
(
val
ue
)
{}
value
(
val
)
{}
explicit
mpscq_node_t
(
T
&&
val
ue
)
:
explicit
mpscq_node_t
(
T
&&
val
)
:
next
(
nullptr
),
value
(
std
::
move
(
val
ue
))
{}
value
(
std
::
move
(
val
))
{}
};
size_t
_max_size
;
...
...
@@ -201,4 +201,4 @@ private:
};
}
}
\ No newline at end of file
}
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