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
8b53671c
Commit
8b53671c
authored
Mar 23, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes in fast_oss
parent
4ed60bef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
include/c11log/details/fast_oss.h
include/c11log/details/fast_oss.h
+5
-11
include/c11log/details/line_logger.h
include/c11log/details/line_logger.h
+1
-0
No files found.
include/c11log/details/fast_oss.h
View file @
8b53671c
...
...
@@ -12,6 +12,7 @@ namespace details
class
str_devicebuf
:
public
std
::
streambuf
{
public:
using
Base
=
std
::
streambuf
;
str_devicebuf
()
=
default
;
~
str_devicebuf
()
=
default
;
...
...
@@ -31,13 +32,7 @@ public:
}
protected:
int
sync
()
override
{
return
0
;
}
// copy the give buffer into the accumulated string.
// reserve initially 128 bytes which should be enough for common log lines
// copy the give buffer into the accumulated fast buffer
std
::
streamsize
xsputn
(
const
char_type
*
s
,
std
::
streamsize
count
)
override
{
_fastbuf
.
append
(
s
,
static_cast
<
unsigned
int
>
(
count
));
...
...
@@ -45,14 +40,13 @@ protected:
}
int_type
overflow
(
int_type
ch
)
override
{
bool
not_eofile
=
traits_type
::
not_eof
(
ch
);
if
(
not_eofile
)
{
if
(
traits_type
::
not_eof
(
ch
))
{
char
c
=
traits_type
::
to_char_type
(
ch
);
xsputn
(
&
c
,
1
);
}
return
not_eofile
;
return
ch
;
}
private:
fast_buf
<
192
>
_fastbuf
;
...
...
include/c11log/details/line_logger.h
View file @
8b53671c
...
...
@@ -62,6 +62,7 @@ public:
{
if
(
_enabled
)
_oss
<<
msg
;
return
std
::
move
(
*
this
);
}
...
...
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