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
dca1d1e0
Commit
dca1d1e0
authored
Jul 17, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to prevent optimizer to remove null sink code altogether
parent
0cef8f3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/spdlog/sinks/null_sink.h
include/spdlog/sinks/null_sink.h
+2
-2
No files found.
include/spdlog/sinks/null_sink.h
View file @
dca1d1e0
...
...
@@ -20,9 +20,9 @@ protected:
void
sink_it_
(
const
details
::
log_msg
&
msg
)
override
{
// prevent optimizer to remove this sink altogether (and do useful check while at it).
if
(
msg
.
level
==
level
::
off
||
this
->
level
()
==
level
::
off
)
if
(
this
->
level
()
==
level
::
off
)
{
printf
(
"null_sink: should never be called if level is off!
\n
"
);
printf
(
"null_sink: should never be called if
its
level is off!
\n
"
);
abort
();
}
}
...
...
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