diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-26 05:51:46 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-26 05:51:46 +0300 |
commit | 6fc7b37583a2fa0815ae50b8c604f823d863cab1 (patch) | |
tree | bbb02a7a513e43a634739c93904f5b23ad913ae0 /source/blender/blenlib/intern/string_utf8.c | |
parent | a3e1a9e2aace26a71c2698cd96ce4086db25e94d (diff) |
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/blenlib/intern/string_utf8.c')
-rw-r--r-- | source/blender/blenlib/intern/string_utf8.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index 992a07b2062..17fb451e422 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -786,9 +786,9 @@ int BLI_str_utf8_offset_to_column(const char *str, int offset) int BLI_str_utf8_offset_from_column(const char *str, int column) { - int offset = 0, pos = 0, col; + int offset = 0, pos = 0; while (*(str + offset) && pos < column) { - col = BLI_str_utf8_char_width_safe(str + offset); + const int col = BLI_str_utf8_char_width_safe(str + offset); if (pos + col > column) { break; } |