aboutsummaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2021-12-24 01:14:12 +0100
committerN-R-K <79544946+N-R-K@users.noreply.github.com>2022-01-06 18:53:02 +0100
commit90bec70e7f186f0e9dbf9e03e555ba50352caff2 (patch)
tree37310cd10fd9b61af4f18a97bcc6186f922b9c87 /commands.c
parent1a185237723229720260a04cb61fcffa96dab4d9 (diff)
downloadnsxiv-90bec70e7f186f0e9dbf9e03e555ba50352caff2.tar.zst
fix -Wshadow related warnings
fixes all -Wshadow related warnings (on gcc). this would allow us to use `-Wshadow` in github workflow (https://github.com/nsxiv/nsxiv/pull/195). i've thought about adding `-Wshadow` to our Makefile as well, but decided against it to keep the Makefile CFLAGS barebore/minimal.
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/commands.c b/commands.c
index 64f609d..423637b 100644
--- a/commands.c
+++ b/commands.c
@@ -328,7 +328,7 @@ bool ci_scroll_to_edge(arg_t dir)
return img_pan_edge(&img, dir);
}
-bool ci_drag(arg_t mode)
+bool ci_drag(arg_t drag_mode)
{
int x, y, ox, oy;
float px, py;
@@ -337,13 +337,13 @@ bool ci_drag(arg_t mode)
if ((int)(img.w * img.zoom) <= win.w && (int)(img.h * img.zoom) <= win.h)
return false;
- win_set_cursor(&win, mode == DRAG_ABSOLUTE ? CURSOR_DRAG_ABSOLUTE : CURSOR_DRAG_RELATIVE);
+ win_set_cursor(&win, drag_mode == DRAG_ABSOLUTE ? CURSOR_DRAG_ABSOLUTE : CURSOR_DRAG_RELATIVE);
win_cursor_pos(&win, &x, &y);
ox = x;
oy = y;
while (true) {
- if (mode == DRAG_ABSOLUTE) {
+ if (drag_mode == DRAG_ABSOLUTE) {
px = MIN(MAX(0.0, x - win.w*0.1), win.w*0.8) / (win.w*0.8)
* (win.w - img.w * img.zoom);
py = MIN(MAX(0.0, y - win.h*0.1), win.h*0.8) / (win.h*0.8)