Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
Operations
Operations
Metrics
Environments
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
cpp-libs
Actor Framework
Commits
b2f9a1c9
Commit
b2f9a1c9
authored
Sep 20, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to std::copy
parent
05eae2f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
libcaf_core/caf/streambuf.hpp
libcaf_core/caf/streambuf.hpp
+2
-4
No files found.
libcaf_core/caf/streambuf.hpp
View file @
b2f9a1c9
...
@@ -255,8 +255,7 @@ protected:
...
@@ -255,8 +255,7 @@ protected:
std
::
streamsize
xsputn
(
const
char_type
*
s
,
std
::
streamsize
n
)
override
{
std
::
streamsize
xsputn
(
const
char_type
*
s
,
std
::
streamsize
n
)
override
{
auto
available
=
this
->
epptr
()
-
this
->
pptr
();
auto
available
=
this
->
epptr
()
-
this
->
pptr
();
auto
actual
=
std
::
min
(
n
,
static_cast
<
std
::
streamsize
>
(
available
));
auto
actual
=
std
::
min
(
n
,
static_cast
<
std
::
streamsize
>
(
available
));
std
::
memcpy
(
this
->
pptr
(),
s
,
std
::
copy
(
s
,
s
+
actual
,
this
->
pptr
());
static_cast
<
size_t
>
(
actual
)
*
sizeof
(
char_type
));
this
->
safe_pbump
(
actual
);
this
->
safe_pbump
(
actual
);
return
actual
;
return
actual
;
}
}
...
@@ -266,8 +265,7 @@ protected:
...
@@ -266,8 +265,7 @@ protected:
std
::
streamsize
xsgetn
(
char_type
*
s
,
std
::
streamsize
n
)
override
{
std
::
streamsize
xsgetn
(
char_type
*
s
,
std
::
streamsize
n
)
override
{
auto
available
=
this
->
egptr
()
-
this
->
gptr
();
auto
available
=
this
->
egptr
()
-
this
->
gptr
();
auto
actual
=
std
::
min
(
n
,
static_cast
<
std
::
streamsize
>
(
available
));
auto
actual
=
std
::
min
(
n
,
static_cast
<
std
::
streamsize
>
(
available
));
std
::
memcpy
(
s
,
this
->
gptr
(),
std
::
copy
(
this
->
gptr
(),
this
->
gptr
()
+
actual
,
s
);
static_cast
<
size_t
>
(
actual
)
*
sizeof
(
char_type
));
this
->
safe_gbump
(
actual
);
this
->
safe_gbump
(
actual
);
return
actual
;
return
actual
;
}
}
...
...
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