Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
ca1286e7
Commit
ca1286e7
authored
Oct 19, 2014
by
gabi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fast_oss minor cleanup
parent
e148b939
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
fast_oss.h
include/c11log/details/fast_oss.h
+14
-8
No files found.
include/c11log/details/fast_oss.h
View file @
ca1286e7
...
...
@@ -33,7 +33,7 @@ public:
other
.
clear
();
}
stack_devicebuf
&
operator
=
(
stack_devicebuf
&&
other
)
stack_devicebuf
&
operator
=
(
stack_devicebuf
other
)
{
std
::
swap
(
_stackbuf
,
other
.
_stackbuf
);
return
*
this
;
...
...
@@ -90,7 +90,7 @@ public:
}
fast_oss
&
operator
=
(
fast_oss
&&
other
)
fast_oss
&
operator
=
(
fast_oss
other
)
{
swap
(
*
this
,
other
);
return
*
this
;
...
...
@@ -102,8 +102,6 @@ public:
swap
(
first
.
_dev
,
second
.
_dev
);
}
std
::
string
str
()
{
auto
&
buffer
=
_dev
.
buf
();
...
...
@@ -136,24 +134,32 @@ public:
}
// put int and pad with zeroes if smalled than min_width
void
write_int
(
int
n
,
int
padding
)
fast_oss
&
operator
<<
(
char
c
)
{
putc
(
c
);
return
*
this
;
}
/// put int and pad with zeroes if smalled than min_width///
void
put_int
(
int
n
,
int
padding
)
{
std
::
string
s
;
details
::
fast_itostr
(
n
,
s
,
padding
);
_dev
.
sputn
(
s
.
data
(),
s
.
size
());
}
void
write
_data
(
const
char
*
p
,
std
::
size_t
size
)
void
put
_data
(
const
char
*
p
,
std
::
size_t
size
)
{
_dev
.
sputn
(
p
,
size
);
}
void
write
_str
(
const
std
::
string
&
s
)
void
put
_str
(
const
std
::
string
&
s
)
{
_dev
.
sputn
(
s
.
data
(),
s
.
size
());
}
void
write
_fast_oss
(
const
fast_oss
&
oss
)
void
put
_fast_oss
(
const
fast_oss
&
oss
)
{
auto
&
buffer
=
oss
.
buf
();
_dev
.
sputn
(
buffer
.
data
(),
buffer
.
size
());
...
...
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