diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp index fc1b7b74f992..89836955b20a 100644 --- a/core/debugger/remote_debugger.cpp +++ b/core/debugger/remote_debugger.cpp @@ -243,7 +243,7 @@ void RemoteDebugger::flush_output() { } while (errors.size()) { - ErrorMessage oe = errors.front()->get(); + ErrorMessage oe = errors.get_front(); _put_msg("error", oe.serialize()); errors.pop_front(); } @@ -388,8 +388,8 @@ Array RemoteDebugger::_get_message() { Array msg; msg.resize(2); - msg[0] = message_list.front()->get().message; - msg[1] = message_list.front()->get().data; + msg[0] = message_list.get_front().message; + msg[1] = message_list.get_front().data; message_list.pop_front(); return msg; } diff --git a/core/input/input.cpp b/core/input/input.cpp index eba7ded267ba..81bdc7506432 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -1050,7 +1050,7 @@ void Input::parse_input_event(const Ref &p_event) { #endif if (use_accumulated_input) { - if (buffered_events.is_empty() || !buffered_events.back()->get()->accumulate(p_event)) { + if (buffered_events.is_empty() || !buffered_events.get_back()->accumulate(p_event)) { buffered_events.push_back(p_event); } } else if (agile_input_event_flushing) { diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 1340382eaa44..cfe312910829 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -433,12 +433,12 @@ Error DirAccessPack::list_dir_begin() { String DirAccessPack::get_next() { if (list_dirs.size()) { cdir = true; - String d = list_dirs.front()->get(); + String d = list_dirs.get_front(); list_dirs.pop_front(); return d; } else if (list_files.size()) { cdir = false; - String f = list_files.front()->get(); + String f = list_files.get_front(); list_files.pop_front(); return f; } else { diff --git a/core/io/plist.cpp b/core/io/plist.cpp index 8d91e6dec294..9f70d985cdf0 100644 --- a/core/io/plist.cpp +++ b/core/io/plist.cpp @@ -701,7 +701,7 @@ bool PList::load_string(const String &p_string, String &r_err_out) { // Add subnode end enter it. Ref dict = PListNode::new_dict(); dict->data_type = PList::PLNodeType::PL_NODE_TYPE_DICT; - if (!stack.back()->get()->push_subnode(dict, key)) { + if (!stack.get_back()->push_subnode(dict, key)) { r_err_out = "Can't push subnode, invalid parent type."; return false; } @@ -721,7 +721,7 @@ bool PList::load_string(const String &p_string, String &r_err_out) { if (token == "/dict") { // Exit current dict. - if (stack.is_empty() || stack.back()->get()->data_type != PList::PLNodeType::PL_NODE_TYPE_DICT) { + if (stack.is_empty() || stack.get_back()->data_type != PList::PLNodeType::PL_NODE_TYPE_DICT) { r_err_out = "Mismatched tag."; return false; } @@ -733,7 +733,7 @@ bool PList::load_string(const String &p_string, String &r_err_out) { if (!stack.is_empty()) { // Add subnode end enter it. Ref arr = PListNode::new_array(); - if (!stack.back()->get()->push_subnode(arr, key)) { + if (!stack.get_back()->push_subnode(arr, key)) { r_err_out = "Can't push subnode, invalid parent type."; return false; } @@ -753,7 +753,7 @@ bool PList::load_string(const String &p_string, String &r_err_out) { if (token == "/array") { // Exit current array. - if (stack.is_empty() || stack.back()->get()->data_type != PList::PLNodeType::PL_NODE_TYPE_ARRAY) { + if (stack.is_empty() || stack.get_back()->data_type != PList::PLNodeType::PL_NODE_TYPE_ARRAY) { r_err_out = "Mismatched tag."; return false; } @@ -800,7 +800,7 @@ bool PList::load_string(const String &p_string, String &r_err_out) { r_err_out = vformat("Invalid value type: %s.", token); return false; } - if (stack.is_empty() || !stack.back()->get()->push_subnode(var, key)) { + if (stack.is_empty() || !stack.get_back()->push_subnode(var, key)) { r_err_out = "Can't push subnode, invalid parent type."; return false; } diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index f026d5416caf..f8195b6a7ab5 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -1267,7 +1267,7 @@ void ResourceLoader::reload_translation_remaps() { //now just make sure to not delete any of these resources while changing locale.. while (to_reload.front()) { - to_reload.front()->get()->reload_from_file(); + to_reload.get_front()->reload_from_file(); to_reload.pop_front(); } } diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp index 6a60a5925d44..0f699875b3ff 100644 --- a/core/math/quick_hull.cpp +++ b/core/math/quick_hull.cpp @@ -213,9 +213,9 @@ Error QuickHull::build(const Vector &p_points, Geometry3D::MeshData &r_ uint32_t debug_stop = debug_stop_after; - while (debug_stop > 0 && faces.back()->get().points_over.size()) { + while (debug_stop > 0 && faces.get_back().points_over.size()) { debug_stop--; - Face &f = faces.back()->get(); + Face &f = faces.get_back(); //find vertex most outside int next = -1; @@ -314,7 +314,7 @@ Error QuickHull::build(const Vector &p_points, Geometry3D::MeshData &r_ //erase lit faces while (lit_faces.size()) { - faces.erase(lit_faces.front()->get()); + faces.erase(lit_faces.get_front()); lit_faces.pop_front(); } diff --git a/core/object/object.cpp b/core/object/object.cpp index b3a4ec6e2ed6..252b81f4de64 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -411,7 +411,7 @@ void Object::set_indexed(const Vector &p_names, const Variant &p_val } for (int i = 1; i < p_names.size() - 1; i++) { - value_stack.push_back(value_stack.back()->get().get_named(p_names[i], valid)); + value_stack.push_back(value_stack.get_back().get_named(p_names[i], valid)); if (r_valid) { *r_valid = valid; } @@ -425,7 +425,7 @@ void Object::set_indexed(const Vector &p_names, const Variant &p_val value_stack.push_back(p_value); // p_names[p_names.size() - 1] for (int i = p_names.size() - 1; i > 0; i--) { - value_stack.back()->prev()->get().set_named(p_names[i], value_stack.back()->get(), valid); + value_stack.back()->prev()->get().set_named(p_names[i], value_stack.get_back(), valid); value_stack.pop_back(); if (r_valid) { @@ -437,7 +437,7 @@ void Object::set_indexed(const Vector &p_names, const Variant &p_val } } - set(p_names[0], value_stack.back()->get(), r_valid); + set(p_names[0], value_stack.get_back(), r_valid); value_stack.pop_back(); ERR_FAIL_COND(!value_stack.is_empty()); @@ -2149,7 +2149,7 @@ Object::~Object() { // Disconnect signals that connect to this object. while (connections.size()) { - Connection c = connections.front()->get(); + Connection c = connections.get_front(); Object *obj = c.callable.get_object(); bool disconnected = false; if (likely(obj)) { diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index c5856a8a81d6..31f5577f1b61 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -781,7 +781,7 @@ void PlaceHolderScriptInstance::update(const List &p_properties, c } while (to_remove.size()) { - values.erase(to_remove.front()->get()); + values.erase(to_remove.get_front()); to_remove.pop_front(); } diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index b73debf04a27..09183b3196e3 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -843,7 +843,7 @@ ShaderGLES3::~ShaderGLES3() { if (remaining.size()) { ERR_PRINT(itos(remaining.size()) + " shaders of type " + name + " were never freed"); while (remaining.size()) { - version_free(remaining.front()->get()); + version_free(remaining.get_front()); remaining.pop_front(); } } diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index 5dca149d99a0..76034e16e8ba 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -1032,7 +1032,7 @@ void MaterialData::update_textures(const HashMap &p_paramet } while (to_delete.front()) { - used_global_textures.erase(to_delete.front()->get()); + used_global_textures.erase(to_delete.get_front()); to_delete.pop_front(); } //handle registering/unregistering global textures diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index c02efc445f83..4f8af9801ba3 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -4160,10 +4160,10 @@ void AnimationTrackEditor::_insert_track(bool p_reset_wanted, bool p_create_bezi TrackIndices next_tracks(animation.ptr(), reset_anim.ptr()); bool advance = false; while (insert_data.size()) { - if (insert_data.front()->get().advance) { + if (insert_data.get_front().advance) { advance = true; } - next_tracks = _confirm_insert(insert_data.front()->get(), next_tracks, p_reset_wanted, reset_anim, p_create_beziers); + next_tracks = _confirm_insert(insert_data.get_front(), next_tracks, p_reset_wanted, reset_anim, p_create_beziers); insert_data.pop_front(); } @@ -4455,10 +4455,10 @@ void AnimationTrackEditor::_confirm_insert_list() { TrackIndices next_tracks(animation.ptr(), reset_anim.ptr()); bool advance = false; while (insert_data.size()) { - if (insert_data.front()->get().advance) { + if (insert_data.get_front().advance) { advance = true; } - next_tracks = _confirm_insert(insert_data.front()->get(), next_tracks, create_reset, reset_anim, insert_confirm_bezier->is_pressed()); + next_tracks = _confirm_insert(insert_data.get_front(), next_tracks, create_reset, reset_anim, insert_confirm_bezier->is_pressed()); insert_data.pop_front(); } diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index d36e152ed9e8..cc125bfff7c9 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -411,7 +411,7 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se int frame = get_animation()->track_get_key_value(get_track(), p_index); String animation_name; if (animations.size() == 1) { - animation_name = animations.front()->get(); + animation_name = animations.get_front(); } else { // Go through other track to find if animation is set String animation_path = get_animation()->track_get_path(get_track()); @@ -503,7 +503,7 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in int frame = get_animation()->track_get_key_value(get_track(), p_index); String animation_name; if (animations.size() == 1) { - animation_name = animations.front()->get(); + animation_name = animations.get_front(); } else { // Go through other track to find if animation is set String animation_path = get_animation()->track_get_path(get_track()); diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp index 8dd4820c4e91..7c06c62e021b 100644 --- a/editor/audio_stream_preview.cpp +++ b/editor/audio_stream_preview.cpp @@ -241,7 +241,7 @@ void AudioStreamPreviewGenerator::_notification(int p_what) { } while (to_erase.front()) { - previews.erase(to_erase.front()->get()); + previews.erase(to_erase.get_front()); to_erase.pop_front(); } } break; diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp index 066cf6330149..f9b2c4e92428 100644 --- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp @@ -114,7 +114,7 @@ Error DAPeer::handle_data() { Error DAPeer::send_data() { while (res_queue.size()) { - Dictionary data = res_queue.front()->get(); + Dictionary data = res_queue.get_front(); if (!data.has("seq")) { data["seq"] = ++seq; } diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp index 38e9145e5349..f9c94bfaf666 100644 --- a/editor/debugger/editor_debugger_tree.cpp +++ b/editor/debugger/editor_debugger_tree.cpp @@ -339,7 +339,7 @@ void EditorDebuggerTree::_item_menu_id_pressed(int p_option) { file_dialog->add_filter("*." + extension, extension.to_upper()); } - String filename = get_selected_path().get_file() + "." + extensions.front()->get().to_lower(); + String filename = get_selected_path().get_file() + "." + extensions.get_front().to_lower(); file_dialog->set_current_path(filename); file_dialog->popup_file_dialog(); } break; diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp index 1ea9a6653478..f06f17f3d810 100644 --- a/editor/debugger/editor_performance_profiler.cpp +++ b/editor/debugger/editor_performance_profiler.cpp @@ -221,7 +221,7 @@ void EditorPerformanceProfiler::_build_monitor_tree() { item->set_checked(0, monitor_checked.has(E.key)); E.value.item = item; if (!E.value.history.is_empty()) { - E.value.update_value(E.value.history.front()->get()); + E.value.update_value(E.value.history.get_front()); } } } diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index d4859fbe4d99..db37644dd29f 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -55,7 +55,7 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) { } if (stack.size()) { - full_name = stack.back()->get() + name; + full_name = stack.get_back() + name; } else { full_name = name; } @@ -337,7 +337,7 @@ void EditorVisualProfiler::_update_frame(bool p_focus_selected) { TreeItem *ensure_selected = nullptr; for (int i = 1; i < m.areas.size() - 1; i++) { - TreeItem *parent = stack.size() ? stack.back()->get() : root; + TreeItem *parent = stack.size() ? stack.get_back() : root; String name = m.areas[i].name; diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index 79e0c7ebd1bc..62d0fe90c150 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -419,7 +419,7 @@ void DocTools::generate(BitField p_flags) { // Populate documentation data for each exposed class. while (classes.size()) { - const String &name = classes.front()->get(); + const String &name = classes.get_front(); if (!ClassDB::is_class_exposed(name)) { print_verbose(vformat("Class '%s' is not exposed, skipping.", name)); classes.pop_front(); @@ -1247,7 +1247,7 @@ Error DocTools::erase_classes(const String &p_dir) { da->list_dir_end(); while (to_erase.size()) { - da->remove(to_erase.front()->get()); + da->remove(to_erase.get_front()); to_erase.pop_front(); } diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 1613d1d62f3c..c664fda5cedf 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -526,7 +526,7 @@ void EditorAutoloadSettings::update_autoload() { autoload_cache.push_back(info); if (need_to_add) { - to_add.push_back(&(autoload_cache.back()->get())); + to_add.push_back(&(autoload_cache.get_back())); } TreeItem *item = tree->create_item(root); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index cfe257fcfc8d..b9bb4d027b44 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -2509,7 +2509,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, const C const String tag = bbcode.substr(brk_pos + 1, brk_end - brk_pos - 1); if (tag.begins_with("/")) { - bool tag_ok = tag_stack.size() && tag_stack.front()->get() == tag.substr(1); + bool tag_ok = tag_stack.size() && tag_stack.get_front() == tag.substr(1); if (!tag_ok) { p_rt->add_text("["); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 2853ebc4994c..ef5af90500e5 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1425,7 +1425,7 @@ void EditorNode::save_resource_as(const Ref &p_resource, const String } else { if (extensions.size()) { String resource_name_snake_case = p_resource->get_class().to_snake_case(); - file->set_current_file("new_" + resource_name_snake_case + "." + preferred.front()->get().to_lower()); + file->set_current_file("new_" + resource_name_snake_case + "." + preferred.get_front().to_lower()); } else { file->set_current_file(String()); } @@ -1435,14 +1435,14 @@ void EditorNode::save_resource_as(const Ref &p_resource, const String if (extensions.size()) { String ext = p_resource->get_path().get_extension().to_lower(); if (extensions.find(ext) == nullptr) { - file->set_current_path(p_resource->get_path().replacen("." + ext, "." + extensions.front()->get())); + file->set_current_path(p_resource->get_path().replacen("." + ext, "." + extensions.get_front())); } } } else if (preferred.size()) { String existing; if (extensions.size()) { String resource_name_snake_case = p_resource->get_class().to_snake_case(); - existing = "new_" + resource_name_snake_case + "." + preferred.front()->get().to_lower(); + existing = "new_" + resource_name_snake_case + "." + preferred.get_front().to_lower(); } file->set_current_path(existing); } @@ -2683,7 +2683,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { break; } opening_prev = true; - open_request(previous_scenes.back()->get()); + open_request(previous_scenes.get_back()); previous_scenes.pop_back(); } break; @@ -2790,13 +2790,13 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { if (extensions.size()) { String ext = path.get_extension().to_lower(); if (extensions.find(ext) == nullptr) { - file->set_current_path(path.replacen("." + ext, "." + extensions.front()->get())); + file->set_current_path(path.replacen("." + ext, "." + extensions.get_front())); } } } else if (extensions.size()) { String root_name = scene->get_name(); root_name = EditorNode::adjust_scene_name_casing(root_name); - file->set_current_path(root_name + "." + extensions.front()->get().to_lower()); + file->set_current_path(root_name + "." + extensions.get_front().to_lower()); } file->set_title(TTR("Save Scene As...")); file->popup_file_dialog(); diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 4dca3b33af78..2926434ed618 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -259,7 +259,7 @@ void EditorResourcePreview::_iterate() { return; } - QueueItem item = queue.front()->get(); + QueueItem item = queue.get_front(); queue.pop_front(); if (cache.has(item.path)) { diff --git a/editor/editor_undo_redo_manager.cpp b/editor/editor_undo_redo_manager.cpp index 57e55e7bacb0..45065c23769a 100644 --- a/editor/editor_undo_redo_manager.cpp +++ b/editor/editor_undo_redo_manager.cpp @@ -305,7 +305,7 @@ bool EditorUndoRedoManager::undo_history(int p_id) { ERR_FAIL_COND_V(p_id == INVALID_HISTORY, false); History &history = get_or_create_history(p_id); - Action action = history.undo_stack.back()->get(); + Action action = history.undo_stack.get_back(); history.undo_stack.pop_back(); history.redo_stack.push_back(action); @@ -329,21 +329,21 @@ bool EditorUndoRedoManager::redo() { History &history = get_or_create_history(GLOBAL_HISTORY); if (!history.redo_stack.is_empty()) { selected_history = history.id; - global_timestamp = history.redo_stack.back()->get().timestamp; + global_timestamp = history.redo_stack.get_back().timestamp; } } { History &history = get_or_create_history(REMOTE_HISTORY); - if (!history.redo_stack.is_empty() && history.redo_stack.back()->get().timestamp < global_timestamp) { + if (!history.redo_stack.is_empty() && history.redo_stack.get_back().timestamp < global_timestamp) { selected_history = history.id; - global_timestamp = history.redo_stack.back()->get().timestamp; + global_timestamp = history.redo_stack.get_back().timestamp; } } { History &history = get_or_create_history(EditorNode::get_editor_data().get_current_edited_scene_history_id()); - if (!history.redo_stack.is_empty() && history.redo_stack.back()->get().timestamp < global_timestamp) { + if (!history.redo_stack.is_empty() && history.redo_stack.get_back().timestamp < global_timestamp) { selected_history = history.id; } } @@ -358,7 +358,7 @@ bool EditorUndoRedoManager::redo_history(int p_id) { ERR_FAIL_COND_V(p_id == INVALID_HISTORY, false); History &history = get_or_create_history(p_id); - Action action = history.redo_stack.back()->get(); + Action action = history.redo_stack.get_back(); history.redo_stack.pop_back(); history.undo_stack.push_back(action); @@ -470,21 +470,21 @@ EditorUndoRedoManager::History *EditorUndoRedoManager::_get_newest_undo() { History &history = get_or_create_history(GLOBAL_HISTORY); if (!history.undo_stack.is_empty()) { selected_history = &history; - global_timestamp = history.undo_stack.back()->get().timestamp; + global_timestamp = history.undo_stack.get_back().timestamp; } } { History &history = get_or_create_history(REMOTE_HISTORY); - if (!history.undo_stack.is_empty() && history.undo_stack.back()->get().timestamp > global_timestamp) { + if (!history.undo_stack.is_empty() && history.undo_stack.get_back().timestamp > global_timestamp) { selected_history = &history; - global_timestamp = history.undo_stack.back()->get().timestamp; + global_timestamp = history.undo_stack.get_back().timestamp; } } { History &history = get_or_create_history(EditorNode::get_editor_data().get_current_edited_scene_history_id()); - if (!history.undo_stack.is_empty() && history.undo_stack.back()->get().timestamp > global_timestamp) { + if (!history.undo_stack.is_empty() && history.undo_stack.get_back().timestamp > global_timestamp) { selected_history = &history; } } diff --git a/editor/export/codesign.cpp b/editor/export/codesign.cpp index 72d496b04d19..491bf62b7e98 100644 --- a/editor/export/codesign.cpp +++ b/editor/export/codesign.cpp @@ -770,7 +770,7 @@ Vector CodeSignRequirements::parse_requirements() const { } if (tokens.size() == 1) { - list.push_back(out + tokens.front()->get()); + list.push_back(out + tokens.get_front()); } else { ERR_FAIL_V_MSG(list, "CodeSign/Requirements: Invalid token sequence."); } diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 53982b37b9fc..10adbcfe46ae 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -375,7 +375,7 @@ Vector FileSystemDock::get_uncollapsed_paths() const { queue.push_back(res_subtree); while (!queue.is_empty()) { - TreeItem *ti = queue.back()->get(); + TreeItem *ti = queue.get_back(); queue.pop_back(); if (!ti->is_collapsed() && ti->get_child_count() > 0) { Variant path = ti->get_metadata(0); @@ -2046,7 +2046,7 @@ void FileSystemDock::_before_move(HashMap &r_uids, Hash List folders; folders.push_back(current_folder); while (folders.front()) { - current_folder = folders.front()->get(); + current_folder = folders.get_front(); for (int j = 0; j < current_folder->get_file_count(); j++) { const String file_path = current_folder->get_file_path(j); renamed_files.insert(file_path); diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp index a63c3f7848ea..f90bd6d8985a 100644 --- a/editor/gui/editor_file_dialog.cpp +++ b/editor/gui/editor_file_dialog.cpp @@ -1021,7 +1021,7 @@ void EditorFileDialog::update_file_list() { sort_file_info_list(file_infos, file_sort); while (!dirs.is_empty()) { - const String &dir_name = dirs.front()->get(); + const String &dir_name = dirs.get_front(); item_list->add_item(dir_name); @@ -1071,7 +1071,7 @@ void EditorFileDialog::update_file_list() { while (!file_infos.is_empty()) { bool match = patterns.is_empty(); - FileInfo file_info = file_infos.front()->get(); + FileInfo file_info = file_infos.get_front(); for (const String &E : patterns) { if (file_info.name.matchn(E)) { match = true; diff --git a/editor/gui/scene_tree_editor.cpp b/editor/gui/scene_tree_editor.cpp index 2e36b66025a2..3043e133a637 100644 --- a/editor/gui/scene_tree_editor.cpp +++ b/editor/gui/scene_tree_editor.cpp @@ -1170,7 +1170,7 @@ void SceneTreeEditor::_edited() { ERR_FAIL_COND(nodes_to_rename.is_empty()); EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); - undo_redo->create_action(TTR("Rename Nodes"), UndoRedo::MERGE_DISABLE, nodes_to_rename.front()->get(), true); + undo_redo->create_action(TTR("Rename Nodes"), UndoRedo::MERGE_DISABLE, nodes_to_rename.get_front(), true); TreeItem *item = which; String new_name = edited->get_text(0); diff --git a/editor/history_dock.cpp b/editor/history_dock.cpp index 1a0971a15cb8..26b97bca5500 100644 --- a/editor/history_dock.cpp +++ b/editor/history_dock.cpp @@ -134,11 +134,11 @@ void HistoryDock::refresh_version() { double newest_undo_timestamp = 0; if (include_scene && !current_scene_history.undo_stack.is_empty()) { - newest_undo_timestamp = current_scene_history.undo_stack.front()->get().timestamp; + newest_undo_timestamp = current_scene_history.undo_stack.get_front().timestamp; } if (include_global && !global_history.undo_stack.is_empty()) { - double global_undo_timestamp = global_history.undo_stack.front()->get().timestamp; + double global_undo_timestamp = global_history.undo_stack.get_front().timestamp; if (global_undo_timestamp > newest_undo_timestamp) { newest_undo_timestamp = global_undo_timestamp; } diff --git a/editor/import/3d/collada.cpp b/editor/import/3d/collada.cpp index 29c373be96a9..2f2c4721e086 100644 --- a/editor/import/3d/collada.cpp +++ b/editor/import/3d/collada.cpp @@ -2299,7 +2299,7 @@ void Collada::_optimize() { } while (!mgeom.is_empty()) { - Node *n = mgeom.front()->get(); + Node *n = mgeom.get_front(); n->parent->children.push_back(n); mgeom.pop_front(); } diff --git a/editor/import/3d/editor_import_collada.cpp b/editor/import/3d/editor_import_collada.cpp index 04a3f2315457..9409fbcbd4dc 100644 --- a/editor/import/3d/editor_import_collada.cpp +++ b/editor/import/3d/editor_import_collada.cpp @@ -1637,7 +1637,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { if (nm.anim_tracks.size() == 1) { //use snapshot keys from anim track instead, because this was most likely exported baked - const Collada::AnimationTrack &at = collada.state.animation_tracks[nm.anim_tracks.front()->get()]; + const Collada::AnimationTrack &at = collada.state.animation_tracks[nm.anim_tracks.get_front()]; snapshots.clear(); for (int i = 0; i < at.keys.size(); i++) { snapshots.push_back(at.keys[i].time); diff --git a/editor/import/3d/resource_importer_obj.cpp b/editor/import/3d/resource_importer_obj.cpp index a579224ecd0a..80fddb3ecec2 100644 --- a/editor/import/3d/resource_importer_obj.cpp +++ b/editor/import/3d/resource_importer_obj.cpp @@ -606,7 +606,7 @@ Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_s String save_path = p_save_path + ".mesh"; - err = ResourceSaver::save(meshes.front()->get()->get_mesh(), save_path); + err = ResourceSaver::save(meshes.get_front()->get_mesh(), save_path); ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save Mesh to file '" + save_path + "'."); diff --git a/editor/import/3d/resource_importer_scene.cpp b/editor/import/3d/resource_importer_scene.cpp index 57f12d7885ed..eea3a75e423d 100644 --- a/editor/import/3d/resource_importer_scene.cpp +++ b/editor/import/3d/resource_importer_scene.cpp @@ -3156,7 +3156,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p List libs; ap->get_animation_library_list(&libs); if (libs.size()) { - library = ap->get_animation_library(libs.front()->get()); + library = ap->get_animation_library(libs.get_front()); break; } } diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index fec8d4b89721..1a5396d368ae 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -974,8 +974,8 @@ void EditorAssetLibrary::_update_image_queue() { } while (to_delete.size()) { - image_queue[to_delete.front()->get()].request->queue_free(); - image_queue.erase(to_delete.front()->get()); + image_queue[to_delete.get_front()].request->queue_free(); + image_queue.erase(to_delete.get_front()); to_delete.pop_front(); } } diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 25d893b84141..95d7745da086 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -544,7 +544,7 @@ Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(const Listget(); + CanvasItem *ci = p_list.get_front(); Rect2 rect = Rect2(ci->get_global_transform_with_canvas().xform(ci->_edit_get_rect().get_center()), Size2()); // Expand with the other ones @@ -2134,7 +2134,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref &p_event) { Point2 drag_delta = drag_to - drag_from; if (drag_selection.size() == 1 && (drag_type == DRAG_MOVE_X || drag_type == DRAG_MOVE_Y)) { - const CanvasItem *selected = drag_selection.front()->get(); + const CanvasItem *selected = drag_selection.get_front(); Transform2D parent_xform = selected->get_global_transform_with_canvas() * selected->get_transform().affine_inverse(); Transform2D unscaled_transform = (transform * parent_xform * selected->_edit_get_transform()).orthonormalized(); Transform2D simple_xform = viewport->get_transform() * unscaled_transform; @@ -3811,8 +3811,8 @@ void CanvasItemEditor::_draw_hover() { } void CanvasItemEditor::_draw_message() { - if (drag_type != DRAG_NONE && !drag_selection.is_empty() && drag_selection.front()->get()) { - Transform2D current_transform = drag_selection.front()->get()->get_global_transform(); + if (drag_type != DRAG_NONE && !drag_selection.is_empty() && drag_selection.get_front()) { + Transform2D current_transform = drag_selection.get_front()->get_global_transform(); double snap = EDITOR_GET("interface/inspector/default_float_step"); int snap_step_decimals = Math::range_step_decimals(snap); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 7e0331d15c1c..d90bb0876f54 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -305,7 +305,7 @@ class EditorScriptCodeCompletionCache : public ScriptCodeCompletionCache { } while (to_clean.front()) { - cached.erase(to_clean.front()->get()); + cached.erase(to_clean.get_front()); to_clean.pop_front(); } } @@ -969,7 +969,7 @@ void ScriptEditor::_close_all_tabs() { void ScriptEditor::_queue_close_tabs() { while (!script_close_queue.is_empty()) { - int idx = script_close_queue.front()->get(); + int idx = script_close_queue.get_front(); script_close_queue.pop_front(); tab_container->set_current_tab(idx); @@ -1303,7 +1303,7 @@ void ScriptEditor::_menu_option(int p_option) { return; } - String path = previous_scripts.back()->get(); + String path = previous_scripts.get_back(); previous_scripts.pop_back(); List extensions; diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 747aa5dc1a45..4fa87e100a6a 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -1565,7 +1565,7 @@ void SpriteFramesEditor::edit(Ref p_frames) { frames->get_animation_list(&anim_names); anim_names.sort_custom(); if (anim_names.size()) { - edited_anim = anim_names.front()->get(); + edited_anim = anim_names.get_front(); } else { edited_anim = StringName(); } diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp index 0ff7aaa3fe46..0d55697eba1b 100644 --- a/editor/plugins/text_shader_editor.cpp +++ b/editor/plugins/text_shader_editor.cpp @@ -489,12 +489,12 @@ void ShaderTextEditor::_validate_script() { ERR_FAIL_COND(err_positions.is_empty()); String err_text = error_pp; - int err_line = err_positions.front()->get().line; + int err_line = err_positions.get_front().line; if (err_positions.size() == 1) { // Error in main file err_text = "error(" + itos(err_line) + "): " + err_text; } else { - err_text = "error(" + itos(err_line) + ") in include " + err_positions.back()->get().file.get_file() + ":" + itos(err_positions.back()->get().line) + ": " + err_text; + err_text = "error(" + itos(err_line) + ") in include " + err_positions.get_back().file.get_file() + ":" + itos(err_positions.get_back().line) + ": " + err_text; set_error_count(err_positions.size() - 1); } diff --git a/editor/plugins/tiles/tile_map_layer_editor.cpp b/editor/plugins/tiles/tile_map_layer_editor.cpp index dcfd92f6f9e0..be0b40004c72 100644 --- a/editor/plugins/tiles/tile_map_layer_editor.cpp +++ b/editor/plugins/tiles/tile_map_layer_editor.cpp @@ -1206,7 +1206,7 @@ HashMap TileMapLayerEditorTilesPlugin::_draw_bucket_fill( List to_check; to_check.push_back(p_coords); while (!to_check.is_empty()) { - Vector2i coords = to_check.back()->get(); + Vector2i coords = to_check.get_back(); to_check.pop_back(); if (!already_checked.has(coords)) { if (source_cell.source_id == edited_layer->get_cell_source_id(coords) && @@ -2726,7 +2726,7 @@ RBSet TileMapLayerEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vec List to_check; to_check.push_back(p_coords); while (!to_check.is_empty()) { - Vector2i coords = to_check.back()->get(); + Vector2i coords = to_check.get_back(); to_check.pop_back(); if (!already_checked.has(coords)) { // Get the candidate cell pattern. diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp index 3213c290fd1f..c337d5d28ba9 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.cpp +++ b/editor/plugins/tiles/tiles_editor_plugin.cpp @@ -79,7 +79,7 @@ void TilesEditorUtils::_thread() { if (pattern_preview_queue.size() == 0) { pattern_preview_mutex.unlock(); } else { - QueueItem item = pattern_preview_queue.front()->get(); + QueueItem item = pattern_preview_queue.get_front(); pattern_preview_queue.pop_front(); pattern_preview_mutex.unlock(); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index df7e74c1c80a..7360ec014da6 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -4178,7 +4178,7 @@ bool VisualShaderEditor::_check_node_drop_on_connection(const Vector2 &p_positio return false; } - Ref intersecting_connection = intersecting_connections.front()->get(); + Ref intersecting_connection = intersecting_connections.get_front(); if (selected_vsnode->is_any_port_connected() || selected_vsnode->get_input_port_count() == 0 || selected_vsnode->get_output_port_count() == 0) { return false; @@ -6160,8 +6160,8 @@ void VisualShaderEditor::_update_preview() { if (err != OK) { ERR_FAIL_COND(err_positions.is_empty()); - String file = err_positions.front()->get().file; - int err_line = err_positions.front()->get().line; + String file = err_positions.get_front().file; + int err_line = err_positions.get_front().line; Color error_line_color = EDITOR_GET("text_editor/theme/highlighting/mark_color"); preview_text->set_line_background_color(err_line - 1, error_line_color); error_panel->show(); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index d5ea20b0eea0..4d679275ed62 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -719,7 +719,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { Node *selected = scene_tree->get_selected(); if (!selected && !editor_selection->get_selected_node_list().is_empty()) { - selected = editor_selection->get_selected_node_list().front()->get(); + selected = editor_selection->get_selected_node_list().get_front(); } if (selected) { @@ -871,7 +871,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); - undo_redo->create_action(TTR("Duplicate Node(s)"), UndoRedo::MERGE_DISABLE, selection.front()->get()); + undo_redo->create_action(TTR("Duplicate Node(s)"), UndoRedo::MERGE_DISABLE, selection.get_front()); undo_redo->add_do_method(editor_selection, "clear"); Node *dupsingle = nullptr; @@ -976,7 +976,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { List nodes = editor_selection->get_selected_node_list(); ERR_FAIL_COND(nodes.size() != 1); - Node *node = nodes.front()->get(); + Node *node = nodes.get_front(); Node *root = get_tree()->get_edited_scene_root(); if (node == root) { @@ -1134,7 +1134,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { break; } - Node *tocopy = selection.front()->get(); + Node *tocopy = selection.get_front(); if (tocopy == scene) { accept->set_text(TTR("Can't save the root node branch as an instantiated scene.\nTo create an editable copy of the current scene, duplicate it using the FileSystem dock context menu\nor create an inherited scene using Scene > New Inherited Scene... instead.")); @@ -1174,7 +1174,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { if (extensions.size()) { String root_name(tocopy->get_name()); root_name = EditorNode::adjust_scene_name_casing(root_name); - existing = root_name + "." + extensions.front()->get().to_lower(); + existing = root_name + "." + extensions.get_front().to_lower(); } new_scene_from_dialog->set_current_path(existing); @@ -2495,7 +2495,7 @@ void SceneTreeDock::_script_created(Ref