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
352ae146
Commit
352ae146
authored
Feb 17, 2016
by
somdoron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove using of dynamic cast
parent
b168e104
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
socket_base.cpp
src/socket_base.cpp
+13
-8
No files found.
src/socket_base.cpp
View file @
352ae146
...
...
@@ -169,9 +169,7 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_,
alloc_assert
(
s
);
mailbox_t
*
mailbox
=
dynamic_cast
<
mailbox_t
*>
(
s
->
mailbox
);
if
(
mailbox
!=
NULL
&&
mailbox
->
get_fd
()
==
retired_fd
)
{
if
(
s
->
mailbox
==
NULL
)
{
s
->
destroyed
=
true
;
LIBZMQ_DELETE
(
s
);
return
NULL
;
...
...
@@ -200,17 +198,24 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_, int sid_, bool
if
(
thread_safe
)
mailbox
=
new
mailbox_safe_t
(
&
sync
);
else
mailbox
=
new
mailbox_t
();
else
{
mailbox_t
*
m
=
new
mailbox_t
();
if
(
m
->
get_fd
()
!=
retired_fd
)
mailbox
=
m
;
else
{
LIBZMQ_DELETE
(
m
);
mailbox
=
NULL
;
}
}
}
zmq
::
socket_base_t
::~
socket_base_t
()
{
LIBZMQ_DELETE
(
mailbox
);
if
(
mailbox
)
LIBZMQ_DELETE
(
mailbox
);
if
(
reaper_signaler
)
{
if
(
reaper_signaler
)
LIBZMQ_DELETE
(
reaper_signaler
);
}
stop_monitor
();
zmq_assert
(
destroyed
);
...
...
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