summaryrefslogtreecommitdiff
path: root/scene/main/http_request.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-01 21:29:33 +0100
committerGitHub <noreply@github.com>2022-02-01 21:29:33 +0100
commitb5707400ebb3daa346fece54c119a5da70852647 (patch)
tree05a82f8a1434e4fa380d9e78cd34c3bcb33ecb1e /scene/main/http_request.cpp
parentdc4483a3a74a4cac83fc0387ea4d09066a0a0e1c (diff)
parentfc27636999a15f88b1f3b1d7101d84a67968ba06 (diff)
Merge pull request #57525 from AnilBK/vector-use-clear-has
Diffstat (limited to 'scene/main/http_request.cpp')
-rw-r--r--scene/main/http_request.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index 65d210983e..dd66f566af 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -46,7 +46,7 @@ Error HTTPRequest::_parse_url(const String &p_url) {
request_sent = false;
got_response = false;
body_len = -1;
- body.resize(0);
+ body.clear();
downloaded.set(0);
redirections = 0;
@@ -202,7 +202,7 @@ void HTTPRequest::cancel_request() {
file = nullptr;
}
client->close();
- body.resize(0);
+ body.clear();
got_response = false;
response_code = -1;
request_sent = false;
@@ -220,7 +220,7 @@ bool HTTPRequest::_handle_response(bool *ret_value) {
response_code = client->get_response_code();
List<String> rheaders;
client->get_response_headers(&rheaders);
- response_headers.resize(0);
+ response_headers.clear();
downloaded.set(0);
for (const String &E : rheaders) {
response_headers.push_back(E);
@@ -260,7 +260,7 @@ bool HTTPRequest::_handle_response(bool *ret_value) {
request_sent = false;
got_response = false;
body_len = -1;
- body.resize(0);
+ body.clear();
downloaded.set(0);
redirections = new_redirs;
*ret_value = false;