Problem: use of C-style casts

Solution: use static_cast/reinterpret_cast instead
This commit is contained in:
Simon Giesecke
2019-12-08 14:26:57 +01:00
committed by Simon Giesecke
parent a83c57d0bb
commit cd954e207d
31 changed files with 123 additions and 107 deletions

View File

@@ -118,7 +118,8 @@ zmq::session_base_t::session_base_t (class io_thread_t *io_thread_,
_wss_hostname (NULL)
{
if (options_.wss_hostname.length () > 0) {
_wss_hostname = (char *) malloc (options_.wss_hostname.length () + 1);
_wss_hostname =
static_cast<char *> (malloc (options_.wss_hostname.length () + 1));
assert (_wss_hostname);
strcpy (_wss_hostname, options_.wss_hostname.c_str ());
}