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
a2f91c55
Commit
a2f91c55
authored
May 30, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: unnecessary passing of non-const data
Solution: make const
parent
c641644b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
socks.cpp
src/socks.cpp
+3
-3
socks.hpp
src/socks.hpp
+1
-1
No files found.
src/socks.cpp
View file @
a2f91c55
...
...
@@ -45,7 +45,7 @@ zmq::socks_greeting_t::socks_greeting_t (uint8_t method_) : num_methods (1)
methods
[
0
]
=
method_
;
}
zmq
::
socks_greeting_t
::
socks_greeting_t
(
uint8_t
*
methods_
,
zmq
::
socks_greeting_t
::
socks_greeting_t
(
const
uint8_t
*
methods_
,
uint8_t
num_methods_
)
:
num_methods
(
num_methods_
)
{
...
...
@@ -273,8 +273,8 @@ bool zmq::socks_response_decoder_t::message_ready () const
return
_bytes_read
==
10
;
if
(
atyp
==
0x03
)
return
_bytes_read
>
4
&&
_bytes_read
==
4
+
1
+
_buf
[
4
]
+
2u
;
else
return
_bytes_read
==
22
;
return
_bytes_read
==
22
;
}
zmq
::
socks_response_t
zmq
::
socks_response_decoder_t
::
decode
()
...
...
src/socks.hpp
View file @
a2f91c55
...
...
@@ -39,7 +39,7 @@ namespace zmq
struct
socks_greeting_t
{
socks_greeting_t
(
uint8_t
method_
);
socks_greeting_t
(
uint8_t
*
methods_
,
uint8_t
num_methods_
);
socks_greeting_t
(
const
uint8_t
*
methods_
,
uint8_t
num_methods_
);
uint8_t
methods
[
UINT8_MAX
];
const
size_t
num_methods
;
...
...
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