diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-12-10 08:56:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-10 08:56:31 +0100 |
| commit | bdf8340e5993ec3f86e4bf1d5ede48df7d023a12 (patch) | |
| tree | 1e366583662397e366d4f84bb334660db37cb5bd /scene/main/http_request.cpp | |
| parent | 5ad9d8bad69309d71ea55f3d799af7e3711dc262 (diff) | |
| parent | 49403cbfa0399bb4284ea5c36cc90216a0bda6ff (diff) | |
| download | redot-engine-bdf8340e5993ec3f86e4bf1d5ede48df7d023a12.tar.gz | |
Merge pull request #43181 from nathanfranke/string-empty
Replace String comparisons with "", String() to is_empty()
Diffstat (limited to 'scene/main/http_request.cpp')
| -rw-r--r-- | scene/main/http_request.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index a4fcc04e20..4797729871 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -243,7 +243,7 @@ bool HTTPRequest::_handle_response(bool *ret_value) { } } - if (new_request != "") { + if (!new_request.is_empty()) { // Process redirect client->close(); int new_redirs = redirections + 1; // Because _request() will clear it @@ -363,7 +363,7 @@ bool HTTPRequest::_update_connection() { return true; } - if (download_to_file != String()) { + if (!download_to_file.is_empty()) { file = FileAccess::open(download_to_file, FileAccess::WRITE); if (!file) { call_deferred(SNAME("_request_done"), RESULT_DOWNLOAD_FILE_CANT_OPEN, response_code, response_headers, PackedByteArray()); |
