Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
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
libzmq
Commits
89ef8b38
Commit
89ef8b38
authored
8 years ago
by
Luca Boccassi
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1938 from hitstergtd/decoder-fix
Problem: style issues in decoder.hpp
parents
95acb29b
8820e35a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
decoder.hpp
src/decoder.hpp
+8
-6
No files found.
src/decoder.hpp
View file @
89ef8b38
...
...
@@ -119,7 +119,8 @@ namespace zmq
bytes_used_
=
size_
;
while
(
!
to_read
)
{
const
int
rc
=
(
static_cast
<
T
*>
(
this
)
->*
next
)
(
data_
+
bytes_used_
);
const
int
rc
=
(
static_cast
<
T
*>
(
this
)
->*
next
)
(
data_
+
bytes_used_
);
if
(
rc
!=
0
)
return
rc
;
}
...
...
@@ -128,11 +129,11 @@ namespace zmq
while
(
bytes_used_
<
size_
)
{
// Copy the data from buffer to the message.
const
s
td
::
s
ize_t
to_copy
=
std
::
min
(
to_read
,
size_
-
bytes_used_
);
//
only copy when the
destination address is different from the
// current address in the buffer
const
size_t
to_copy
=
std
::
min
(
to_read
,
size_
-
bytes_used_
);
//
Only copy when
destination address is different from the
// current address in the buffer
.
if
(
read_pos
!=
data_
+
bytes_used_
)
{
std
::
memcpy
(
read_pos
,
data_
+
bytes_used_
,
to_copy
);
memcpy
(
read_pos
,
data_
+
bytes_used_
,
to_copy
);
}
read_pos
+=
to_copy
;
...
...
@@ -142,7 +143,8 @@ namespace zmq
// If none is available, return.
while
(
to_read
==
0
)
{
// pass current address in the buffer
const
int
rc
=
(
static_cast
<
T
*>
(
this
)
->*
next
)
(
data_
+
bytes_used_
);
const
int
rc
=
(
static_cast
<
T
*>
(
this
)
->*
next
)
(
data_
+
bytes_used_
);
if
(
rc
!=
0
)
return
rc
;
}
...
...
This diff is collapsed.
Click to expand it.
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