summaryrefslogtreecommitdiff
path: root/core/io/http_client.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-12 17:01:17 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 10:01:56 +0200
commit1f6f364a56319eabd02c050746fe7df3f55ffee3 (patch)
tree8bebdce946466ce8e9476ccd46c9dba62c323938 /core/io/http_client.h
parente7c9d818766a119089873e4941e4865fb36883ec (diff)
Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
Diffstat (limited to 'core/io/http_client.h')
-rw-r--r--core/io/http_client.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/core/io/http_client.h b/core/io/http_client.h
index 03ba20f8dd..05690534ae 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -158,32 +158,32 @@ private:
};
#ifndef JAVASCRIPT_ENABLED
- Status status;
- IP::ResolverID resolving;
- int conn_port;
+ Status status = STATUS_DISCONNECTED;
+ IP::ResolverID resolving = IP::RESOLVER_INVALID_ID;
+ int conn_port = -1;
String conn_host;
- bool ssl;
- bool ssl_verify_host;
- bool blocking;
- bool handshaking;
- bool head_request;
+ bool ssl = false;
+ bool ssl_verify_host = false;
+ bool blocking = false;
+ bool handshaking = false;
+ bool head_request = false;
Vector<uint8_t> response_str;
- bool chunked;
+ bool chunked = false;
Vector<uint8_t> chunk;
- int chunk_left;
- bool chunk_trailer_part;
- int body_size;
- int body_left;
- bool read_until_eof;
+ int chunk_left = 0;
+ bool chunk_trailer_part = false;
+ int body_size = -1;
+ int body_left = 0;
+ bool read_until_eof = false;
Ref<StreamPeerTCP> tcp_connection;
Ref<StreamPeer> connection;
- int response_num;
+ int response_num = 0;
Vector<String> response_headers;
- int read_chunk_size;
+ int read_chunk_size = 4096;
Error _get_http_data(uint8_t *p_buffer, int p_bytes, int &r_received);