summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-04-28 11:35:39 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-04-28 11:35:39 +0200
commita793960a1092764a81f240726e58bf34e06d7767 (patch)
tree9fb6079c95ba3b773d11dbbbfc08c1f4d1dca204 /editor
parentd01e4124eb56698fdcd68bb3186affba97779c28 (diff)
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
Diffstat (limited to 'editor')
-rw-r--r--editor/import/collada.cpp2
-rw-r--r--editor/import/collada.h2
-rw-r--r--editor/plugins/node_3d_editor_gizmos.cpp2
-rw-r--r--editor/plugins/node_3d_editor_gizmos.h2
4 files changed, 4 insertions, 4 deletions
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<float> &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<Vector3> &p_handles, const Ref<
}
}
-void EditorNode3DGizmo::add_solid_box(Ref<Material> &p_material, Vector3 p_size, Vector3 p_position, const Transform3D &p_xform) {
+void EditorNode3DGizmo::add_solid_box(const Ref<Material> &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<TriangleMesh> &p_tmesh);
void add_unscaled_billboard(const Ref<Material> &p_material, real_t p_scale = 1, const Color &p_modulate = Color(1, 1, 1));
void add_handles(const Vector<Vector3> &p_handles, const Ref<Material> &p_material, const Vector<int> &p_ids = Vector<int>(), bool p_billboard = false, bool p_secondary = false);
- void add_solid_box(Ref<Material> &p_material, Vector3 p_size, Vector3 p_position = Vector3(), const Transform3D &p_xform = Transform3D());
+ void add_solid_box(const Ref<Material> &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;