Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-10-18 00:36:02 +0300
committerHans Goudey <h.goudey@me.com>2020-10-18 00:36:02 +0300
commitf425f40c4e17e889c720647b26c07ae3f6d3ba64 (patch)
treeb8b42d0862def239c0a05d2b3cae452aba68464d /source/blender/windowmanager/intern/wm_cursors.c
parent85e78fa17cd54676b5aa9a15a0b885b4a7187086 (diff)
Cleanup: More miscellaneous code quality changes in wm directory
- Declare variables where initialized. - Use LISTBASE_FOREACH macro. - Reduce variable scope. - Return early or reduce indentation in some cases.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_cursors.c')
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index b3185f57577..0f39e6ccf80 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -353,7 +353,6 @@ void WM_cursor_time(wmWindow *win, int nr)
};
uchar mask[16][2];
uchar bitmap[16][2] = {{0}};
- int i, idx;
if (win->lastcursor == 0) {
win->lastcursor = win->cursor;
@@ -362,12 +361,12 @@ void WM_cursor_time(wmWindow *win, int nr)
memset(&mask, 0xFF, sizeof(mask));
/* print number bottom right justified */
- for (idx = 3; nr && idx >= 0; idx--) {
+ for (int idx = 3; nr && idx >= 0; idx--) {
const char *digit = number_bitmaps[nr % 10];
int x = idx % 2;
int y = idx / 2;
- for (i = 0; i < 8; i++) {
+ for (int i = 0; i < 8; i++) {
bitmap[i + y * 8][x] = digit[i];
}
nr /= 10;