summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/file_access_unix.cpp7
-rw-r--r--drivers/unix/file_access_unix.h8
-rw-r--r--drivers/unix/net_socket_posix.cpp4
-rw-r--r--drivers/unix/net_socket_posix.h4
4 files changed, 7 insertions, 16 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index 4aa408a1f0..54a585c6fd 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -354,14 +354,7 @@ FileAccess *FileAccessUnix::create_libc() {
CloseNotificationFunc FileAccessUnix::close_notification_func = nullptr;
-FileAccessUnix::FileAccessUnix() :
- f(nullptr),
- flags(0),
- last_error(OK) {
-}
-
FileAccessUnix::~FileAccessUnix() {
-
close();
}
diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h
index 8116f72345..1dd080914d 100644
--- a/drivers/unix/file_access_unix.h
+++ b/drivers/unix/file_access_unix.h
@@ -42,10 +42,10 @@ typedef void (*CloseNotificationFunc)(const String &p_file, int p_flags);
class FileAccessUnix : public FileAccess {
- FILE *f;
- int flags;
+ FILE *f = nullptr;
+ int flags = 0;
void check_errors() const;
- mutable Error last_error;
+ mutable Error last_error = OK;
String save_path;
String path;
String path_src;
@@ -84,7 +84,7 @@ public:
virtual uint32_t _get_unix_permissions(const String &p_file);
virtual Error _set_unix_permissions(const String &p_file, uint32_t p_permissions);
- FileAccessUnix();
+ FileAccessUnix() {}
virtual ~FileAccessUnix();
};
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp
index 7c6543c3a2..81ea20e5da 100644
--- a/drivers/unix/net_socket_posix.cpp
+++ b/drivers/unix/net_socket_posix.cpp
@@ -173,9 +173,7 @@ void NetSocketPosix::cleanup() {
}
NetSocketPosix::NetSocketPosix() :
- _sock(SOCK_EMPTY),
- _ip_type(IP::TYPE_NONE),
- _is_stream(false) {
+ _sock(SOCK_EMPTY) {
}
NetSocketPosix::~NetSocketPosix() {
diff --git a/drivers/unix/net_socket_posix.h b/drivers/unix/net_socket_posix.h
index 0a19967265..2e767eef92 100644
--- a/drivers/unix/net_socket_posix.h
+++ b/drivers/unix/net_socket_posix.h
@@ -48,8 +48,8 @@ class NetSocketPosix : public NetSocket {
private:
SOCKET_TYPE _sock;
- IP::Type _ip_type;
- bool _is_stream;
+ IP::Type _ip_type = IP::TYPE_NONE;
+ bool _is_stream = false;
enum NetError {
ERR_NET_WOULD_BLOCK,