From a793960a1092764a81f240726e58bf34e06d7767 Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Thu, 28 Apr 2022 11:35:39 +0200 Subject: Fix cppcheck const parameters Convert method signature parameters to const where it is possible # Conflicts: # drivers/gles3/rasterizer_canvas_gles3.cpp # drivers/gles3/rasterizer_canvas_gles3.h # editor/plugins/animation_state_machine_editor.cpp # editor/plugins/animation_state_machine_editor.h --- editor/import/collada.cpp | 2 +- editor/import/collada.h | 2 +- editor/plugins/node_3d_editor_gizmos.cpp | 2 +- editor/plugins/node_3d_editor_gizmos.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'editor') diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp index f8c99ff7d4..af91ced570 100644 --- a/editor/import/collada.cpp +++ b/editor/import/collada.cpp @@ -122,7 +122,7 @@ static Transform3D _read_transform_from_array(const Vector &array, int of /* STRUCTURES */ -Transform3D Collada::Node::compute_transform(Collada &state) const { +Transform3D Collada::Node::compute_transform(const Collada &state) const { Transform3D xform; for (int i = 0; i < xform_list.size(); i++) { diff --git a/editor/import/collada.h b/editor/import/collada.h index 85735e93ac..df2b789081 100644 --- a/editor/import/collada.h +++ b/editor/import/collada.h @@ -348,7 +348,7 @@ public: Node *parent = nullptr; - Transform3D compute_transform(Collada &state) const; + Transform3D compute_transform(const Collada &state) const; Transform3D get_global_transform() const; Transform3D get_transform() const; diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp index 179f78325c..47c8c66c57 100644 --- a/editor/plugins/node_3d_editor_gizmos.cpp +++ b/editor/plugins/node_3d_editor_gizmos.cpp @@ -476,7 +476,7 @@ void EditorNode3DGizmo::add_handles(const Vector &p_handles, const Ref< } } -void EditorNode3DGizmo::add_solid_box(Ref &p_material, Vector3 p_size, Vector3 p_position, const Transform3D &p_xform) { +void EditorNode3DGizmo::add_solid_box(const Ref &p_material, Vector3 p_size, Vector3 p_position, const Transform3D &p_xform) { ERR_FAIL_COND(!spatial_node); BoxMesh box_mesh; diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h index 8adb753a51..f859ceda3b 100644 --- a/editor/plugins/node_3d_editor_gizmos.h +++ b/editor/plugins/node_3d_editor_gizmos.h @@ -99,7 +99,7 @@ public: void add_collision_triangles(const Ref &p_tmesh); void add_unscaled_billboard(const Ref &p_material, real_t p_scale = 1, const Color &p_modulate = Color(1, 1, 1)); void add_handles(const Vector &p_handles, const Ref &p_material, const Vector &p_ids = Vector(), bool p_billboard = false, bool p_secondary = false); - void add_solid_box(Ref &p_material, Vector3 p_size, Vector3 p_position = Vector3(), const Transform3D &p_xform = Transform3D()); + void add_solid_box(const Ref &p_material, Vector3 p_size, Vector3 p_position = Vector3(), const Transform3D &p_xform = Transform3D()); virtual bool is_handle_highlighted(int p_id, bool p_secondary) const; virtual String get_handle_name(int p_id, bool p_secondary) const; -- cgit v1.2.3