diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-29 10:39:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 10:39:27 +0100 |
commit | 8a14dc746a15a62e14ac9ba9549b70bac709830c (patch) | |
tree | 4fe74909f95d303bd3814291fa67fa03267a0b4a /platform/javascript | |
parent | c6e9d912e129373d81e6610a3733ffc7fb7a146b (diff) | |
parent | 09212fba1ebbb29595456b01bf25c0ca80592a2d (diff) |
Merge pull request #44788 from akien-mga/container-is_empty
Fix missed renamings from empty() to is_empty()
Diffstat (limited to 'platform/javascript')
-rw-r--r-- | platform/javascript/api/javascript_tools_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | platform/javascript/display_server_javascript.cpp | 2 | ||||
-rw-r--r-- | platform/javascript/http_client_javascript.cpp | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/platform/javascript/api/javascript_tools_editor_plugin.cpp b/platform/javascript/api/javascript_tools_editor_plugin.cpp index a063718a0c..2096dacdd8 100644 --- a/platform/javascript/api/javascript_tools_editor_plugin.cpp +++ b/platform/javascript/api/javascript_tools_editor_plugin.cpp @@ -108,7 +108,7 @@ void JavaScriptToolsEditorPlugin::_zip_recursive(String p_path, String p_base_pa } dir->list_dir_begin(); String cur = dir->get_next(); - while (!cur.empty()) { + while (!cur.is_empty()) { String cs = p_path.plus_file(cur); if (cur == "." || cur == ".." || cur == ".import") { // Skip diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp index 92e13553fc..643530541d 100644 --- a/platform/javascript/display_server_javascript.cpp +++ b/platform/javascript/display_server_javascript.cpp @@ -93,7 +93,7 @@ EM_BOOL DisplayServerJavaScript::fullscreen_change_callback(int p_event_type, co DisplayServerJavaScript *display = get_singleton(); // Empty ID is canvas. String target_id = String::utf8(p_event->id); - if (target_id.empty() || target_id == String::utf8(display->canvas_id)) { + if (target_id.is_empty() || target_id == String::utf8(display->canvas_id)) { // This event property is the only reliable data on // browser fullscreen state. if (p_event->isFullscreen) { diff --git a/platform/javascript/http_client_javascript.cpp b/platform/javascript/http_client_javascript.cpp index cb0e48b8a9..b81de88fbf 100644 --- a/platform/javascript/http_client_javascript.cpp +++ b/platform/javascript/http_client_javascript.cpp @@ -78,15 +78,15 @@ Error HTTPClient::prepare_request(Method p_method, const String &p_url, const Ve ERR_FAIL_INDEX_V(p_method, METHOD_MAX, ERR_INVALID_PARAMETER); ERR_FAIL_COND_V_MSG(p_method == METHOD_TRACE || p_method == METHOD_CONNECT, ERR_UNAVAILABLE, "HTTP methods TRACE and CONNECT are not supported for the HTML5 platform."); ERR_FAIL_COND_V(status != STATUS_CONNECTED, ERR_INVALID_PARAMETER); - ERR_FAIL_COND_V(host.empty(), ERR_UNCONFIGURED); + ERR_FAIL_COND_V(host.is_empty(), ERR_UNCONFIGURED); ERR_FAIL_COND_V(port < 0, ERR_UNCONFIGURED); ERR_FAIL_COND_V(!p_url.begins_with("/"), ERR_INVALID_PARAMETER); String url = (use_tls ? "https://" : "http://") + host + ":" + itos(port) + p_url; godot_xhr_reset(xhr_id); godot_xhr_open(xhr_id, _methods[p_method], url.utf8().get_data(), - username.empty() ? nullptr : username.utf8().get_data(), - password.empty() ? nullptr : password.utf8().get_data()); + username.is_empty() ? nullptr : username.utf8().get_data(), + password.is_empty() ? nullptr : password.utf8().get_data()); for (int i = 0; i < p_headers.size(); i++) { int header_separator = p_headers[i].find(": "); @@ -132,7 +132,7 @@ HTTPClient::Status HTTPClient::get_status() const { } bool HTTPClient::has_response() const { - return !polled_response_header.empty(); + return !polled_response_header.is_empty(); } bool HTTPClient::is_response_chunked() const { @@ -145,7 +145,7 @@ int HTTPClient::get_response_code() const { } Error HTTPClient::get_response_headers(List<String> *r_response) { - if (polled_response_header.empty()) + if (polled_response_header.is_empty()) return ERR_INVALID_PARAMETER; Vector<String> header_lines = polled_response_header.split("\r\n", false); |