Blender Git Loki

Git Commits -> Revision be906f4

Revision be906f4 by Campbell Barton (master)
August 25, 2021, 05:27 (GMT)
BLI_string_utf8: simplify utf8 stepping logic

There were multiple utf8 functions which treated
errors slightly differently.

Split BLI_str_utf8_as_unicode_step into two functions.

- BLI_str_utf8_as_unicode_step_or_error returns error value
when decoding fails and doesn't step.

- BLI_str_utf8_as_unicode_step always steps forward at least one
returning the byte value without decoding
(needed to display some latin1 file-paths).

Font drawing uses BLI_str_utf8_as_unicode_step and no longer
check for error values.

Commit Details:

Full Hash: be906f44c6bb51eb492ecb90dbc1e8e0bc01d1ec
Parent Commit: 70f890b
Lines Changed: +41, -46

3 Modified Paths:

/source/blender/blenfont/intern/blf_font.c (+4, -5) (Diff)
/source/blender/blenlib/BLI_string_utf8.h (+3, -0) (Diff)
/source/blender/blenlib/intern/string_utf8.c (+34, -41) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021