[retro-gtk] pixdata: Move variable declarations in their blocks
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] pixdata: Move variable declarations in their blocks
- Date: Tue, 22 Dec 2020 14:04:54 +0000 (UTC)
commit 1c83f492d3b6f8e303a8c8205537cda76990956c
Author: Adrien Plazas <kekun plazas laposte net>
Date: Mon Dec 21 15:43:40 2020 +0100
pixdata: Move variable declarations in their blocks
It makes the code easier to understand.
retro-gtk/retro-pixdata.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/retro-gtk/retro-pixdata.c b/retro-gtk/retro-pixdata.c
index 5528937..cdcc351 100644
--- a/retro-gtk/retro-pixdata.c
+++ b/retro-gtk/retro-pixdata.c
@@ -137,14 +137,12 @@ rgba8888_from_video (gconstpointer src,
gsize pitch,
GetRGBA8888 get_pixel)
{
- gsize src_row, dst_row, src_col;
-
for (gsize row = 0 ; row < height ; row++) {
- src_row = row * pitch;
- dst_row = row * width;
+ gsize src_row = row * pitch;
+ gsize dst_row = row * width;
for (gsize col = 0 ; col < width ; col++) {
- src_col = col * pixel_size;
+ gsize src_col = col * pixel_size;
dst[dst_row + col] = get_pixel (src_row + src_col + src);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]