From 13e82094ee6deb325ba83111af7e354177ac0009 Mon Sep 17 00:00:00 2001 From: Robert Yevdokimov Date: Fri, 23 Feb 2024 14:49:13 -0500 Subject: [PATCH] Remove word duplicates in comments and strings, and fix casing and punctuation --- core/config/project_settings.cpp | 2 +- core/extension/gdextension.cpp | 2 +- core/math/basis.cpp | 2 +- core/object/script_instance.h | 2 +- core/object/worker_thread_pool.cpp | 2 +- core/string/ustring.cpp | 2 +- core/templates/rid_owner.h | 2 +- core/variant/variant_construct.h | 2 +- drivers/d3d12/rendering_device_driver_d3d12.cpp | 2 +- drivers/gles3/storage/mesh_storage.cpp | 2 +- editor/editor_settings.cpp | 6 +++--- editor/gui/scene_tree_editor.cpp | 2 +- modules/gdscript/language_server/godot_lsp.h | 2 +- modules/multiplayer/editor/replication_editor.cpp | 2 +- modules/multiplayer/scene_replication_interface.cpp | 2 +- scene/2d/tile_map_layer.cpp | 4 ++-- scene/gui/text_edit.cpp | 6 +++--- .../resources/skeleton_modification_2d_twoboneik.cpp | 12 ++++++------ .../renderer_rd/storage_rd/mesh_storage.cpp | 2 +- servers/rendering/rendering_device.cpp | 10 +++++----- 20 files changed, 34 insertions(+), 34 deletions(-) diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index d3cbae2f29b..d9a5a5094ae 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1093,7 +1093,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust } else if (p_path.ends_with(".binary")) { return _save_settings_binary(p_path, save_props, p_custom, save_features); } else { - ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, "Unknown config file format: " + p_path + "."); + ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, "Unknown config file format: " + p_path); } } diff --git a/core/extension/gdextension.cpp b/core/extension/gdextension.cpp index c1298c86877..5d43dceece2 100644 --- a/core/extension/gdextension.cpp +++ b/core/extension/gdextension.cpp @@ -431,7 +431,7 @@ void GDExtension::_register_extension_class_internal(GDExtensionClassLibraryPtr //inheriting from engine class } } else { - ERR_FAIL_MSG("Attempt to register an extension class '" + String(class_name) + "' using non-existing parent class '" + String(parent_class_name) + "'"); + ERR_FAIL_MSG("Attempt to register an extension class '" + String(class_name) + "' using non-existing parent class '" + String(parent_class_name) + "'."); } #ifdef TOOLS_ENABLED diff --git a/core/math/basis.cpp b/core/math/basis.cpp index 1ff6cdd588d..5c310959607 100644 --- a/core/math/basis.cpp +++ b/core/math/basis.cpp @@ -685,7 +685,7 @@ void Basis::set_euler(const Vector3 &p_euler, EulerOrder p_order) { *this = zmat * ymat * xmat; } break; default: { - ERR_FAIL_MSG("Invalid order parameter for set_euler(vec3,order)"); + ERR_FAIL_MSG("Invalid Euler order parameter."); } } } diff --git a/core/object/script_instance.h b/core/object/script_instance.h index df978a25ea2..45d51534fcd 100644 --- a/core/object/script_instance.h +++ b/core/object/script_instance.h @@ -76,7 +76,7 @@ public: } //this is used by script languages that keep a reference counter of their own - //you can make make Ref<> not die when it reaches zero, so deleting the reference + //you can make Ref<> not die when it reaches zero, so deleting the reference //depends entirely from the script virtual void refcount_incremented() {} diff --git a/core/object/worker_thread_pool.cpp b/core/object/worker_thread_pool.cpp index e2ab473b01d..ef3d315e4bd 100644 --- a/core/object/worker_thread_pool.cpp +++ b/core/object/worker_thread_pool.cpp @@ -551,7 +551,7 @@ void WorkerThreadPool::wait_for_group_task_completion(GroupID p_group) { Group **groupp = groups.getptr(p_group); task_mutex.unlock(); if (!groupp) { - ERR_FAIL_MSG("Invalid Group ID"); + ERR_FAIL_MSG("Invalid Group ID."); } { diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 540891b3b09..a8a96e6e3f1 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -1536,7 +1536,7 @@ String String::num(double p_num, int p_decimals) { fmt[5] = 'f'; fmt[6] = 0; } - // if we want to convert a double with as much decimal places as as + // if we want to convert a double with as much decimal places as // DBL_MAX or DBL_MIN then we would theoretically need a buffer of at least // DBL_MAX_10_EXP + 2 for DBL_MAX and DBL_MAX_10_EXP + 4 for DBL_MIN. // BUT those values where still giving me exceptions, so I tested from diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h index e6c62ebf432..f92e0f41626 100644 --- a/core/templates/rid_owner.h +++ b/core/templates/rid_owner.h @@ -270,7 +270,7 @@ public: if (THREAD_SAFE) { spin_lock.unlock(); } - ERR_FAIL_MSG("Attempted to free an uninitialized or invalid RID"); + ERR_FAIL_MSG("Attempted to free an uninitialized or invalid RID."); } else if (unlikely(validator_chunks[idx_chunk][idx_element] != validator)) { if (THREAD_SAFE) { spin_lock.unlock(); diff --git a/core/variant/variant_construct.h b/core/variant/variant_construct.h index ef7bf2dfc23..36935907ae7 100644 --- a/core/variant/variant_construct.h +++ b/core/variant/variant_construct.h @@ -661,7 +661,7 @@ public: VariantInternal::clear(r_ret); } static void ptr_construct(void *base, const void **p_args) { - ERR_FAIL_MSG("can't ptrcall nil constructor"); + ERR_FAIL_MSG("Cannot ptrcall nil constructor"); } static int get_argument_count() { diff --git a/drivers/d3d12/rendering_device_driver_d3d12.cpp b/drivers/d3d12/rendering_device_driver_d3d12.cpp index 6efef0fb346..e74ea910a0f 100644 --- a/drivers/d3d12/rendering_device_driver_d3d12.cpp +++ b/drivers/d3d12/rendering_device_driver_d3d12.cpp @@ -1860,7 +1860,7 @@ void RenderingDeviceDriverD3D12::command_pipeline_barrier( VectorView p_buffer_barriers, VectorView p_texture_barriers) { if (p_src_stages.has_flag(PIPELINE_STAGE_ALL_COMMANDS_BIT) && p_dst_stages.has_flag(PIPELINE_STAGE_ALL_COMMANDS_BIT)) { - // Looks like the intent is a a full barrier. + // Looks like the intent is a full barrier. // In the resource barriers world, we can force a full barrier by discarding some resource, as per // https://microsoft.github.io/DirectX-Specs/d3d/D3D12EnhancedBarriers.html#synchronous-copy-discard-and-resolve. const CommandBufferInfo *cmd_buf_info = (const CommandBufferInfo *)p_cmd_buffer.id; diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp index 8ab66e2bc64..1dcd29553dd 100644 --- a/drivers/gles3/storage/mesh_storage.cpp +++ b/drivers/gles3/storage/mesh_storage.cpp @@ -219,7 +219,7 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) glGenBuffers(1, &s->vertex_buffer); glBindBuffer(GL_ARRAY_BUFFER, s->vertex_buffer); // If we have an uncompressed surface that contains normals, but not tangents, we need to differentiate the array - // from a compressed array in the shader. To do so, we allow the the normal to read 4 components out of the buffer + // from a compressed array in the shader. To do so, we allow the normal to read 4 components out of the buffer // But only give it 2 components per normal. So essentially, each vertex reads the next normal in normal.zw. // This allows us to avoid adding a shader permutation, and avoid passing dummy tangents. Since the stride is kept small // this should still be a net win for bandwidth. diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 63a9ab5684d..853a4cd410e 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -1588,7 +1588,7 @@ Ref ED_GET_SHORTCUT(const String &p_path) { Ref sc = EditorSettings::get_singleton()->get_shortcut(p_path); - ERR_FAIL_COND_V_MSG(!sc.is_valid(), sc, "Used ED_GET_SHORTCUT with invalid shortcut: " + p_path + "."); + ERR_FAIL_COND_V_MSG(!sc.is_valid(), sc, "Used ED_GET_SHORTCUT with invalid shortcut: " + p_path); return sc; } @@ -1597,7 +1597,7 @@ void ED_SHORTCUT_OVERRIDE(const String &p_path, const String &p_feature, Key p_k ERR_FAIL_NULL_MSG(EditorSettings::get_singleton(), "EditorSettings not instantiated yet."); Ref sc = EditorSettings::get_singleton()->get_shortcut(p_path); - ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE with invalid shortcut: " + p_path + "."); + ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE with invalid shortcut: " + p_path); PackedInt32Array arr; arr.push_back((int32_t)p_keycode); @@ -1609,7 +1609,7 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c ERR_FAIL_NULL_MSG(EditorSettings::get_singleton(), "EditorSettings not instantiated yet."); Ref sc = EditorSettings::get_singleton()->get_shortcut(p_path); - ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE_ARRAY with invalid shortcut: " + p_path + "."); + ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE_ARRAY with invalid shortcut: " + p_path); // Only add the override if the OS supports the provided feature. if (!OS::get_singleton()->has_feature(p_feature)) { diff --git a/editor/gui/scene_tree_editor.cpp b/editor/gui/scene_tree_editor.cpp index 14af49aabff..f54ded7c74c 100644 --- a/editor/gui/scene_tree_editor.cpp +++ b/editor/gui/scene_tree_editor.cpp @@ -767,7 +767,7 @@ bool SceneTreeEditor::_item_matches_all_terms(TreeItem *p_item, PackedStringArra // Filter by Type. String type = get_node(p_item->get_metadata(0))->get_class(); bool term_in_inherited_class = false; - // Every Node is is a Node, duh! + // Every Node is a Node, duh! while (type != "Node") { if (type.to_lower().contains(argument)) { term_in_inherited_class = true; diff --git a/modules/gdscript/language_server/godot_lsp.h b/modules/gdscript/language_server/godot_lsp.h index e09adb74bd8..284762018fe 100644 --- a/modules/gdscript/language_server/godot_lsp.h +++ b/modules/gdscript/language_server/godot_lsp.h @@ -200,7 +200,7 @@ struct LocationLink { /** * The range that should be selected and revealed when this link is being followed, e.g the name of a function. - * Must be contained by the the `targetRange`. See also `DocumentSymbol#range` + * Must be contained by the `targetRange`. See also `DocumentSymbol#range` */ Range targetSelectionRange; }; diff --git a/modules/multiplayer/editor/replication_editor.cpp b/modules/multiplayer/editor/replication_editor.cpp index 51974e77670..f6df212d35f 100644 --- a/modules/multiplayer/editor/replication_editor.cpp +++ b/modules/multiplayer/editor/replication_editor.cpp @@ -292,7 +292,7 @@ ReplicationEditor::ReplicationEditor() { vb->add_child(tree); drop_label = memnew(Label); - drop_label->set_text(TTR("Add properties using the options above, or\ndrag them them from the inspector and drop them here.")); + drop_label->set_text(TTR("Add properties using the options above, or\ndrag them from the inspector and drop them here.")); drop_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); drop_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER); tree->add_child(drop_label); diff --git a/modules/multiplayer/scene_replication_interface.cpp b/modules/multiplayer/scene_replication_interface.cpp index b61cf0bf1d8..bb32eed1a90 100644 --- a/modules/multiplayer/scene_replication_interface.cpp +++ b/modules/multiplayer/scene_replication_interface.cpp @@ -421,7 +421,7 @@ Error SceneReplicationInterface::_update_spawn_visibility(int p_peer, const Obje // Check visibility for each peers. for (const KeyValue &E : peers_info) { if (is_visible) { - // This is fast, since the the object is visible to everyone, we don't need to check each peer. + // This is fast, since the object is visible to everyone, we don't need to check each peer. if (E.value.spawn_nodes.has(p_oid)) { // Already spawned. continue; diff --git a/scene/2d/tile_map_layer.cpp b/scene/2d/tile_map_layer.cpp index 8b2542b34e9..2753fee7e94 100644 --- a/scene/2d/tile_map_layer.cpp +++ b/scene/2d/tile_map_layer.cpp @@ -1666,7 +1666,7 @@ void TileMapLayer::_internal_update() { Vector to_delete; for (SelfList *cell_data_list_element = dirty.cell_list.first(); cell_data_list_element; cell_data_list_element = cell_data_list_element->next()) { CellData &cell_data = *cell_data_list_element->self(); - // Select the the cell from tile_map if it is invalid. + // Select the cell from tile_map if it is invalid. if (cell_data.cell.source_id == TileSet::INVALID_SOURCE) { to_delete.push_back(cell_data.coords); } @@ -2978,4 +2978,4 @@ TerrainConstraint::TerrainConstraint(Ref p_tile_set, const Vector2i &p_ } } terrain = p_terrain; -} \ No newline at end of file +} diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 59be64b6dc3..79a5f2b5572 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -229,7 +229,7 @@ void TextEdit::Text::invalidate_cache(int p_line, int p_column, bool p_text_chan } text.write[p_line].height = height; - // If this line has shrunk, this may no longer the the tallest line. + // If this line has shrunk, this may no longer the tallest line. if (old_height == line_height && height < line_height) { _calculate_line_height(); } else { @@ -241,7 +241,7 @@ void TextEdit::Text::invalidate_cache(int p_line, int p_column, bool p_text_chan int line_width = get_line_width(p_line); text.write[p_line].width = line_width; - // If this line has shrunk, this may no longer the the longest line. + // If this line has shrunk, this may no longer the longest line. if (old_width == max_width && line_width < max_width) { _calculate_max_line_width(); } else if (!is_hidden(p_line)) { @@ -731,7 +731,7 @@ void TextEdit::_notification(int p_what) { // Draw the minimap. - // Add visual feedback when dragging or hovering the the visible area rectangle. + // Add visual feedback when dragging or hovering the visible area rectangle. float viewport_alpha; if (dragging_minimap) { viewport_alpha = 0.25; diff --git a/scene/resources/skeleton_modification_2d_twoboneik.cpp b/scene/resources/skeleton_modification_2d_twoboneik.cpp index 4458cdc0e34..c3366d5c36d 100644 --- a/scene/resources/skeleton_modification_2d_twoboneik.cpp +++ b/scene/resources/skeleton_modification_2d_twoboneik.cpp @@ -281,16 +281,16 @@ void SkeletonModification2DTwoBoneIK::update_joint_one_bone2d_cache() { if (stack->skeleton->has_node(joint_one_bone2d_node)) { Node *node = stack->skeleton->get_node(joint_one_bone2d_node); ERR_FAIL_COND_MSG(!node || stack->skeleton == node, - "Cannot update update joint one Bone2D cache: node is this modification's skeleton or cannot be found!"); + "Cannot update joint one Bone2D cache: node is this modification's skeleton or cannot be found!"); ERR_FAIL_COND_MSG(!node->is_inside_tree(), - "Cannot update update joint one Bone2D cache: node is not in the scene tree!"); + "Cannot update joint one Bone2D cache: node is not in the scene tree!"); joint_one_bone2d_node_cache = node->get_instance_id(); Bone2D *bone = Object::cast_to(node); if (bone) { joint_one_bone_idx = bone->get_index_in_skeleton(); } else { - ERR_FAIL_MSG("update joint one Bone2D cache: Nodepath to Bone2D is not a Bone2D node!"); + ERR_FAIL_MSG("Update joint one Bone2D cache: Nodepath to Bone2D is not a Bone2D node!"); } } } @@ -309,16 +309,16 @@ void SkeletonModification2DTwoBoneIK::update_joint_two_bone2d_cache() { if (stack->skeleton->has_node(joint_two_bone2d_node)) { Node *node = stack->skeleton->get_node(joint_two_bone2d_node); ERR_FAIL_COND_MSG(!node || stack->skeleton == node, - "Cannot update update joint two Bone2D cache: node is this modification's skeleton or cannot be found!"); + "Cannot update joint two Bone2D cache: node is this modification's skeleton or cannot be found!"); ERR_FAIL_COND_MSG(!node->is_inside_tree(), - "Cannot update update joint two Bone2D cache: node is not in scene tree!"); + "Cannot update joint two Bone2D cache: node is not in scene tree!"); joint_two_bone2d_node_cache = node->get_instance_id(); Bone2D *bone = Object::cast_to(node); if (bone) { joint_two_bone_idx = bone->get_index_in_skeleton(); } else { - ERR_FAIL_MSG("update joint two Bone2D cache: Nodepath to Bone2D is not a Bone2D node!"); + ERR_FAIL_MSG("Update joint two Bone2D cache: Nodepath to Bone2D is not a Bone2D node!"); } } } diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp index 1f362ffd21c..9d3def1246c 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp @@ -374,7 +374,7 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) if (new_surface.vertex_data.size()) { // If we have an uncompressed surface that contains normals, but not tangents, we need to differentiate the array - // from a compressed array in the shader. To do so, we allow the the normal to read 4 components out of the buffer + // from a compressed array in the shader. To do so, we allow the normal to read 4 components out of the buffer // But only give it 2 components per normal. So essentially, each vertex reads the next normal in normal.zw. // This allows us to avoid adding a shader permutation, and avoid passing dummy tangents. Since the stride is kept small // this should still be a net win for bandwidth. diff --git a/servers/rendering/rendering_device.cpp b/servers/rendering/rendering_device.cpp index 2cfee25f912..e1709fdb00e 100644 --- a/servers/rendering/rendering_device.cpp +++ b/servers/rendering/rendering_device.cpp @@ -3782,12 +3782,12 @@ void RenderingDevice::draw_list_draw(DrawListID p_list, bool p_use_indices, uint #ifdef DEBUG_ENABLED if (dl->state.sets[i].pipeline_expected_format != dl->state.sets[i].uniform_set_format) { if (dl->state.sets[i].uniform_set_format == 0) { - ERR_FAIL_MSG("Uniforms were never supplied for set (" + itos(i) + ") at the time of drawing, which are required by the pipeline"); + ERR_FAIL_MSG("Uniforms were never supplied for set (" + itos(i) + ") at the time of drawing, which are required by the pipeline."); } else if (uniform_set_owner.owns(dl->state.sets[i].uniform_set)) { UniformSet *us = uniform_set_owner.get_or_null(dl->state.sets[i].uniform_set); ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + "):\n" + _shader_uniform_debug(us->shader_id, us->shader_set) + "\nare not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(dl->state.pipeline_shader)); } else { - ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + ", which was was just freed) are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(dl->state.pipeline_shader)); + ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + ", which was just freed) are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(dl->state.pipeline_shader)); } } #endif @@ -4173,12 +4173,12 @@ void RenderingDevice::compute_list_dispatch(ComputeListID p_list, uint32_t p_x_g #ifdef DEBUG_ENABLED if (cl->state.sets[i].pipeline_expected_format != cl->state.sets[i].uniform_set_format) { if (cl->state.sets[i].uniform_set_format == 0) { - ERR_FAIL_MSG("Uniforms were never supplied for set (" + itos(i) + ") at the time of drawing, which are required by the pipeline"); + ERR_FAIL_MSG("Uniforms were never supplied for set (" + itos(i) + ") at the time of drawing, which are required by the pipeline."); } else if (uniform_set_owner.owns(cl->state.sets[i].uniform_set)) { UniformSet *us = uniform_set_owner.get_or_null(cl->state.sets[i].uniform_set); ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + "):\n" + _shader_uniform_debug(us->shader_id, us->shader_set) + "\nare not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader)); } else { - ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + ", which was was just freed) are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader)); + ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + ", which was just freed) are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader)); } } #endif @@ -4271,7 +4271,7 @@ void RenderingDevice::compute_list_dispatch_indirect(ComputeListID p_list, RID p UniformSet *us = uniform_set_owner.get_or_null(cl->state.sets[i].uniform_set); ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + "):\n" + _shader_uniform_debug(us->shader_id, us->shader_set) + "\nare not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader)); } else { - ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + ", which was was just freed) are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader)); + ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + ", which was just freed) are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader)); } } #endif