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 /drivers/unix | |
parent | 41d1dba35fc851258d5aabad819d09f6a43e324c (diff) |
Moved member variables to initializer list
Diffstat (limited to 'drivers/unix')
-rw-r--r-- | drivers/unix/file_access_unix.cpp | 9 | ||||
-rw-r--r-- | drivers/unix/net_socket_posix.cpp | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 3b97b95f7c..10f6be3cbe 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -309,11 +309,10 @@ FileAccess *FileAccessUnix::create_libc() { CloseNotificationFunc FileAccessUnix::close_notification_func = NULL; -FileAccessUnix::FileAccessUnix() { - - f = NULL; - flags = 0; - last_error = OK; +FileAccessUnix::FileAccessUnix() : + f(NULL), + flags(0), + last_error(OK) { } FileAccessUnix::~FileAccessUnix() { diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index 833b17f122..740b1edb9c 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -167,10 +167,10 @@ void NetSocketPosix::cleanup() { #endif } -NetSocketPosix::NetSocketPosix() { - _sock = SOCK_EMPTY; - _ip_type = IP::TYPE_NONE; - _is_stream = false; +NetSocketPosix::NetSocketPosix() : + _sock(SOCK_EMPTY), + _ip_type(IP::TYPE_NONE), + _is_stream(false) { } NetSocketPosix::~NetSocketPosix() { |