1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 12:42:41 +00:00

Explicitly cast NULL to the specific type for compilers that (for some unknown reason) require it

This commit is contained in:
Pavel Labath 2009-12-10 23:42:22 +01:00
parent b4feb01818
commit 316198a0c3

View File

@ -115,11 +115,11 @@ struct _tcp_port_monitor_t {
std::vector<const tcp_connection_t *> p_peek; std::vector<const tcp_connection_t *> p_peek;
_tcp_port_monitor_t(int max_connections) _tcp_port_monitor_t(int max_connections)
: hash(), p_peek(max_connections, NULL) : hash(), p_peek(max_connections, static_cast<const tcp_connection_t *>(NULL))
{ } { }
_tcp_port_monitor_t(const _tcp_port_monitor_t &other) _tcp_port_monitor_t(const _tcp_port_monitor_t &other)
: hash(other.hash), p_peek(other.p_peek.size(), NULL) : hash(other.hash), p_peek(other.p_peek.size(), static_cast<const tcp_connection_t *>(NULL))
{ {
// we must rebuild the peek table because the pointers are no longer valid // we must rebuild the peek table because the pointers are no longer valid
rebuild_peek_table(); rebuild_peek_table();