diff options
-rw-r--r-- | doc/classes/TextEdit.xml | 2 | ||||
-rw-r--r-- | editor/debugger/editor_visual_profiler.cpp | 2 | ||||
-rw-r--r-- | modules/mono/mono_gd/support/android_support.cpp | 2 | ||||
-rw-r--r-- | modules/mono/utils/mono_reg_utils.cpp | 2 | ||||
-rw-r--r-- | modules/text_server_fb/dynamic_font_fb.cpp | 2 | ||||
-rw-r--r-- | modules/text_server_fb/text_server_fb.cpp | 4 | ||||
-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 | ||||
-rw-r--r-- | scene/animation/animation_player.cpp | 4 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 2 | ||||
-rw-r--r-- | scene/resources/text_paragraph.cpp | 2 |
12 files changed, 18 insertions, 18 deletions
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index eedf3b848f..e8a54c6c20 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -404,7 +404,7 @@ Returns an empty [code]Dictionary[/code] if no result was found. Otherwise, returns a [code]Dictionary[/code] containing [code]line[/code] and [code]column[/code] entries, e.g: [codeblock] var result = search(key, flags, line, column) - if !result.empty(): + if !result.is_empty(): # Result found. var line_number = result.line var column_number = result.column diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index d7a09d6b0c..8e8edbbe9a 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -666,7 +666,7 @@ bool EditorVisualProfiler::is_profiling() { Vector<Vector<String>> EditorVisualProfiler::get_data_as_csv() const { Vector<Vector<String>> res; #if 0 - if (frame_metrics.empty()) { + if (frame_metrics.is_empty()) { return res; } diff --git a/modules/mono/mono_gd/support/android_support.cpp b/modules/mono/mono_gd/support/android_support.cpp index bc2ae03299..5bd70748c3 100644 --- a/modules/mono/mono_gd/support/android_support.cpp +++ b/modules/mono/mono_gd/support/android_support.cpp @@ -134,7 +134,7 @@ String determine_app_native_lib_dir() { } String get_app_native_lib_dir() { - if (app_native_lib_dir_cache.empty()) + if (app_native_lib_dir_cache.is_empty()) app_native_lib_dir_cache = determine_app_native_lib_dir(); return app_native_lib_dir_cache; } diff --git a/modules/mono/utils/mono_reg_utils.cpp b/modules/mono/utils/mono_reg_utils.cpp index 9902744743..52d3fa93be 100644 --- a/modules/mono/utils/mono_reg_utils.cpp +++ b/modules/mono/utils/mono_reg_utils.cpp @@ -188,7 +188,7 @@ String find_msbuild_tools_path() { if (key == "installationPath") { String val = line.substr(sep_idx + 1, line.length()).strip_edges(); - ERR_BREAK(val.empty()); + ERR_BREAK(val.is_empty()); if (!val.ends_with("\\")) { val += "\\"; diff --git a/modules/text_server_fb/dynamic_font_fb.cpp b/modules/text_server_fb/dynamic_font_fb.cpp index ca9e5b580b..120774d8e7 100644 --- a/modules/text_server_fb/dynamic_font_fb.cpp +++ b/modules/text_server_fb/dynamic_font_fb.cpp @@ -54,7 +54,7 @@ DynamicFontDataFallback::DataAtSize *DynamicFontDataFallback::get_data_for_size( fds = E->get(); } else { if (font_mem == nullptr && font_path != String()) { - if (!font_mem_cache.empty()) { + if (!font_mem_cache.is_empty()) { font_mem = font_mem_cache.ptr(); font_mem_size = font_mem_cache.size(); } else { diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index 675d0e5d4d..0cc56a6735 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -550,7 +550,7 @@ bool TextServerFallback::shaped_text_add_string(RID p_shaped, const String &p_te ERR_FAIL_COND_V(!sd, false); ERR_FAIL_COND_V(p_size <= 0, false); - if (p_text.empty()) { + if (p_text.is_empty()) { return true; } @@ -573,7 +573,7 @@ bool TextServerFallback::shaped_text_add_string(RID p_shaped, const String &p_te span.fonts.push_back(p_fonts[i]); } } - ERR_FAIL_COND_V(span.fonts.empty(), false); + ERR_FAIL_COND_V(span.fonts.is_empty(), false); span.font_size = p_size; span.language = p_language; 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); diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 159ccae130..506106687b 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -782,13 +782,13 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd, float p_delta, f delta = next_pos - cd.pos; // Fix delta (after determination of backwards because negative zero is lost here) if (&cd == &playback.current) { - if (!backwards && cd.pos <= len && next_pos == len /*&& playback.blend.empty()*/) { + if (!backwards && cd.pos <= len && next_pos == len) { //playback finished end_reached = true; end_notify = cd.pos < len; // Notify only if not already at the end } - if (backwards && cd.pos >= 0 && next_pos == 0 /*&& playback.blend.empty()*/) { + if (backwards && cd.pos >= 0 && next_pos == 0) { //playback finished end_reached = true; end_notify = cd.pos > 0; // Notify only if not already at the beginning diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 68c0f5eb5b..82f2106432 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2359,7 +2359,7 @@ bool RichTextLabel::remove_line(const int p_line) { void RichTextLabel::push_dropcap(const String &p_string, const Ref<Font> &p_font, int p_size, const Rect2 &p_dropcap_margins, const Color &p_color, int p_ol_size, const Color &p_ol_color) { ERR_FAIL_COND(current->type == ITEM_TABLE); - ERR_FAIL_COND(p_string.empty()); + ERR_FAIL_COND(p_string.is_empty()); ERR_FAIL_COND(p_font.is_null()); ERR_FAIL_COND(p_size <= 0); diff --git a/scene/resources/text_paragraph.cpp b/scene/resources/text_paragraph.cpp index c9e8a8fbc6..60e86e95db 100644 --- a/scene/resources/text_paragraph.cpp +++ b/scene/resources/text_paragraph.cpp @@ -147,7 +147,7 @@ void TextParagraph::_shape_lines() { TS->free(line); break; } - if (!tab_stops.empty()) { + if (!tab_stops.is_empty()) { TS->shaped_text_tab_align(line, tab_stops); } if (align == HALIGN_FILL && (line_breaks.size() == 1 || i < line_breaks.size() - 1)) { |