summaryrefslogtreecommitdiff
path: root/scene/resources
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 /scene/resources
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 'scene/resources')
-rw-r--r--scene/resources/gradient.cpp2
-rw-r--r--scene/resources/gradient.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/gradient.cpp b/scene/resources/gradient.cpp
index caaa3d8628..a9c44dc6bf 100644
--- a/scene/resources/gradient.cpp
+++ b/scene/resources/gradient.cpp
@@ -157,7 +157,7 @@ void Gradient::reverse() {
emit_signal(CoreStringNames::get_singleton()->changed);
}
-void Gradient::set_points(Vector<Gradient::Point> &p_points) {
+void Gradient::set_points(const Vector<Gradient::Point> &p_points) {
points = p_points;
is_sorted = false;
emit_signal(CoreStringNames::get_singleton()->changed);
diff --git a/scene/resources/gradient.h b/scene/resources/gradient.h
index c2085b3a13..a3d3449099 100644
--- a/scene/resources/gradient.h
+++ b/scene/resources/gradient.h
@@ -73,7 +73,7 @@ public:
void add_point(float p_offset, const Color &p_color);
void remove_point(int p_index);
- void set_points(Vector<Point> &p_points);
+ void set_points(const Vector<Point> &p_points);
Vector<Point> &get_points();
void reverse();