diff options
author | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2018-12-08 15:07:33 -0500 |
---|---|---|
committer | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2018-12-11 18:33:01 -0500 |
commit | 08f22f1cf0e0d133b7ea763dc3886cf462c6fcb2 (patch) | |
tree | 5f4321fb0e3150ca159598b6badcf1a90d1fdcd6 /core/io/packet_peer_udp.cpp | |
parent | 41d1dba35fc851258d5aabad819d09f6a43e324c (diff) |
Moved member variables to initializer list
Diffstat (limited to 'core/io/packet_peer_udp.cpp')
-rw-r--r-- | core/io/packet_peer_udp.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp index d33ba6f855..2e916d6a48 100644 --- a/core/io/packet_peer_udp.cpp +++ b/core/io/packet_peer_udp.cpp @@ -239,13 +239,12 @@ void PacketPeerUDP::_bind_methods() { ClassDB::bind_method(D_METHOD("set_dest_address", "host", "port"), &PacketPeerUDP::_set_dest_address); } -PacketPeerUDP::PacketPeerUDP() { - - _sock = Ref<NetSocket>(NetSocket::create()); - blocking = true; - packet_port = 0; - queue_count = 0; - peer_port = 0; +PacketPeerUDP::PacketPeerUDP() : + packet_port(0), + queue_count(0), + peer_port(0), + blocking(true), + _sock(Ref<NetSocket>(NetSocket::create())) { rb.resize(16); } |