diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-09 19:41:07 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-09 19:41:07 +0300 |
commit | 63916f5941b443dfc8566682bb75374e5abd553f (patch) | |
tree | fb0704701f1d4d9acbddf4a6fbc62c819d8d4c36 /source/blender/editors/screen/area.c | |
parent | 0cff2c944f9c2cd3ac873fe826c4399fc2f32159 (diff) |
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 8ec58b4c75e..2da9dd01ceb 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -3303,7 +3303,6 @@ static void metadata_draw_imbuf(ImBuf *ibuf, const rctf *rect, int fontid, const char temp_str[MAX_METADATA_STR]; int line_width; int ofs_y = 0; - short i; int len; const float height = BLF_height_max(fontid); const float margin = height / 8; @@ -3317,7 +3316,7 @@ static void metadata_draw_imbuf(ImBuf *ibuf, const rctf *rect, int fontid, const const float ymax = (rect->ymax - margin) - descender; if (is_top) { - for (i = 0; i < 4; i++) { + for (int i = 0; i < 4; i++) { /* first line */ if (i == 0) { bool do_newline = false; @@ -3382,7 +3381,7 @@ static void metadata_draw_imbuf(ImBuf *ibuf, const rctf *rect, int fontid, const IMB_metadata_foreach(ibuf, metadata_custom_draw_fields, &ctx); int ofs_x = 0; ofs_y = ctx.current_y; - for (i = 5; i < 10; i++) { + for (int i = 5; i < 10; i++) { len = BLI_snprintf_rlen(temp_str, MAX_METADATA_STR, "%s: ", meta_data_list[i]); if (metadata_is_valid(ibuf, temp_str, i, len)) { BLF_position(fontid, xmin + ofs_x, ymin + ofs_y, 0.0f); |