From 28f57aa43958b7df5d65e1a76e206fdfc98715e7 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 17 Apr 2022 03:20:34 +0200 Subject: [PATCH] Fix shadowed declaration. --- modules/paint/paint_canvas.cpp | 10 +++++----- modules/paint/paint_canvas.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/paint/paint_canvas.cpp b/modules/paint/paint_canvas.cpp index 544e9e5ad..f6c03c7c0 100644 --- a/modules/paint/paint_canvas.cpp +++ b/modules/paint/paint_canvas.cpp @@ -424,12 +424,12 @@ void PaintCanvas::hide_grid() { grid->hide(); } -PoolVector2iArray PaintCanvas::select_color(const int x, const int y) { +PoolVector2iArray PaintCanvas::select_color(const int p_x, const int p_y) { PoolVector2iArray same_color_pixels; - Color color = get_pixel(x, y); + Color color = get_pixel(p_x, p_y); for (int x = 0; x < active_layer->layer_width; ++x) { - for (int x = 0; x < active_layer->layer_height; ++x) { + for (int y = 0; y < active_layer->layer_height; ++y) { Color pixel_color = active_layer->get_pixel(x, y); if (pixel_color == color) { same_color_pixels.append(Vector2i(x, y)); @@ -439,8 +439,8 @@ PoolVector2iArray PaintCanvas::select_color(const int x, const int y) { return same_color_pixels; } -PoolVector2iArray PaintCanvas::select_same_color(const int x, const int y) { - return get_neighbouring_pixels(x, y); +PoolVector2iArray PaintCanvas::select_same_color(const int p_x, const int p_y) { + return get_neighbouring_pixels(p_x, p_y); } // returns array of Vector2 diff --git a/modules/paint/paint_canvas.h b/modules/paint/paint_canvas.h index 35385610b..00dc9e1c6 100644 --- a/modules/paint/paint_canvas.h +++ b/modules/paint/paint_canvas.h @@ -103,8 +103,8 @@ public: void show_grid(); void hide_grid(); - PoolVector2iArray select_color(const int x, const int y); - PoolVector2iArray select_same_color(const int x, const int y); + PoolVector2iArray select_color(const int p_x, const int p_y); + PoolVector2iArray select_same_color(const int p_x, const int p_y); PoolVector2iArray get_neighbouring_pixels(const int pos_x, const int pos_y); void resize(int width, int height);