Merge pull request #44788 from akien-mga/container-is_empty
Fix missed renamings from empty() to is_empty()
This commit is contained in:
commit
8a14dc746a
12 changed files with 18 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 += "\\";
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue