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
56bdba59
Commit
56bdba59
authored
Jan 18, 2011
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cppcheck warnings: Prefer prefix ++/-- operators for non-primitive types.
Signed-off-by:
Martin Sustrik
<
sustrik@250bpm.com
>
parent
b262f2fe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
15 deletions
+15
-15
ctx.cpp
src/ctx.cpp
+3
-3
epoll.cpp
src/epoll.cpp
+2
-2
kqueue.cpp
src/kqueue.cpp
+1
-1
own.cpp
src/own.cpp
+1
-1
pgm_receiver.cpp
src/pgm_receiver.cpp
+1
-1
poller_base.cpp
src/poller_base.cpp
+1
-1
select.cpp
src/select.cpp
+2
-2
xrep.cpp
src/xrep.cpp
+4
-4
No files found.
src/ctx.cpp
View file @
56bdba59
...
...
@@ -266,11 +266,11 @@ void zmq::ctx_t::unregister_endpoints (socket_base_t *socket_)
while
(
it
!=
endpoints
.
end
())
{
if
(
it
->
second
.
socket
==
socket_
)
{
endpoints_t
::
iterator
to_erase
=
it
;
it
++
;
++
it
;
endpoints
.
erase
(
to_erase
);
continue
;
}
it
++
;
++
it
;
}
endpoints_sync
.
unlock
();
...
...
@@ -327,7 +327,7 @@ void zmq::ctx_t::dezombify ()
slots
[
tid
]
=
NULL
;
}
else
it
++
;
++
it
;
}
}
src/epoll.cpp
View file @
56bdba59
...
...
@@ -46,7 +46,7 @@ zmq::epoll_t::~epoll_t ()
worker
.
stop
();
close
(
epoll_fd
);
for
(
retired_t
::
iterator
it
=
retired
.
begin
();
it
!=
retired
.
end
();
it
++
)
for
(
retired_t
::
iterator
it
=
retired
.
begin
();
it
!=
retired
.
end
();
++
it
)
delete
*
it
;
}
...
...
@@ -162,7 +162,7 @@ void zmq::epoll_t::loop ()
// Destroy retired event sources.
for
(
retired_t
::
iterator
it
=
retired
.
begin
();
it
!=
retired
.
end
();
it
++
)
++
it
)
delete
*
it
;
retired
.
clear
();
}
...
...
src/kqueue.cpp
View file @
56bdba59
...
...
@@ -177,7 +177,7 @@ void zmq::kqueue_t::loop ()
// Destroy retired event sources.
for
(
retired_t
::
iterator
it
=
retired
.
begin
();
it
!=
retired
.
end
();
it
++
)
++
it
)
delete
*
it
;
retired
.
clear
();
}
...
...
src/own.cpp
View file @
56bdba59
...
...
@@ -158,7 +158,7 @@ void zmq::own_t::process_term (int linger_)
zmq_assert
(
!
terminating
);
// Send termination request to all owned objects.
for
(
owned_t
::
iterator
it
=
owned
.
begin
();
it
!=
owned
.
end
();
it
++
)
for
(
owned_t
::
iterator
it
=
owned
.
begin
();
it
!=
owned
.
end
();
++
it
)
send_term
(
*
it
,
linger_
);
register_term_acks
(
owned
.
size
());
owned
.
clear
();
...
...
src/pgm_receiver.cpp
View file @
56bdba59
...
...
@@ -73,7 +73,7 @@ void zmq::pgm_receiver_t::plug (io_thread_t *io_thread_, i_inout *inout_)
void
zmq
::
pgm_receiver_t
::
unplug
()
{
// Delete decoders.
for
(
peers_t
::
iterator
it
=
peers
.
begin
();
it
!=
peers
.
end
();
it
++
)
{
for
(
peers_t
::
iterator
it
=
peers
.
begin
();
it
!=
peers
.
end
();
++
it
)
{
if
(
it
->
second
.
decoder
!=
NULL
)
delete
it
->
second
.
decoder
;
}
...
...
src/poller_base.cpp
View file @
56bdba59
...
...
@@ -54,7 +54,7 @@ void zmq::poller_base_t::add_timer (int timeout_, i_poll_events *sink_, int id_)
void
zmq
::
poller_base_t
::
cancel_timer
(
i_poll_events
*
sink_
,
int
id_
)
{
// Complexity of this operation is O(n). We assume it is rarely used.
for
(
timers_t
::
iterator
it
=
timers
.
begin
();
it
!=
timers
.
end
();
it
++
)
for
(
timers_t
::
iterator
it
=
timers
.
begin
();
it
!=
timers
.
end
();
++
it
)
if
(
it
->
second
.
sink
==
sink_
&&
it
->
second
.
id
==
id_
)
{
timers
.
erase
(
it
);
return
;
...
...
src/select.cpp
View file @
56bdba59
...
...
@@ -83,7 +83,7 @@ void zmq::select_t::rm_fd (handle_t handle_)
{
// Mark the descriptor as retired.
fd_set_t
::
iterator
it
;
for
(
it
=
fds
.
begin
();
it
!=
fds
.
end
();
it
++
)
for
(
it
=
fds
.
begin
();
it
!=
fds
.
end
();
++
it
)
if
(
it
->
fd
==
handle_
)
break
;
zmq_assert
(
it
!=
fds
.
end
());
...
...
@@ -104,7 +104,7 @@ void zmq::select_t::rm_fd (handle_t handle_)
// highest-numbered file descriptor.
if
(
handle_
==
maxfd
)
{
maxfd
=
retired_fd
;
for
(
fd_set_t
::
iterator
it
=
fds
.
begin
();
it
!=
fds
.
end
();
it
++
)
for
(
fd_set_t
::
iterator
it
=
fds
.
begin
();
it
!=
fds
.
end
();
++
it
)
if
(
it
->
fd
>
maxfd
)
maxfd
=
it
->
fd
;
}
...
...
src/xrep.cpp
View file @
56bdba59
...
...
@@ -87,10 +87,10 @@ void zmq::xrep_t::process_term (int linger_)
register_term_acks
(
inpipes
.
size
()
+
outpipes
.
size
());
for
(
inpipes_t
::
iterator
it
=
inpipes
.
begin
();
it
!=
inpipes
.
end
();
it
++
)
++
it
)
it
->
reader
->
terminate
();
for
(
outpipes_t
::
iterator
it
=
outpipes
.
begin
();
it
!=
outpipes
.
end
();
it
++
)
++
it
)
it
->
second
.
writer
->
terminate
();
socket_base_t
::
process_term
(
linger_
);
...
...
@@ -99,7 +99,7 @@ void zmq::xrep_t::process_term (int linger_)
void
zmq
::
xrep_t
::
terminated
(
reader_t
*
pipe_
)
{
for
(
inpipes_t
::
iterator
it
=
inpipes
.
begin
();
it
!=
inpipes
.
end
();
it
++
)
{
++
it
)
{
if
(
it
->
reader
==
pipe_
)
{
inpipes
.
erase
(
it
);
if
(
terminating
)
...
...
@@ -135,7 +135,7 @@ void zmq::xrep_t::delimited (reader_t *pipe_)
void
zmq
::
xrep_t
::
activated
(
reader_t
*
pipe_
)
{
for
(
inpipes_t
::
iterator
it
=
inpipes
.
begin
();
it
!=
inpipes
.
end
();
it
++
)
{
++
it
)
{
if
(
it
->
reader
==
pipe_
)
{
zmq_assert
(
!
it
->
active
);
it
->
active
=
true
;
...
...
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