Refactor: BLF Offset from Cursor Position Early Exits #120673

Merged
Harley Acheson merged 1 commits from Harley/blender:BlfEarlyExits into main 2024-04-15 20:50:34 +02:00

1 Commits

Author SHA1 Message Date
Harley Acheson 668d010f70 Refactor: BLF Offset from Cursor Position Early Exits
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
BLF function blf_str_offset_from_cursor_position returns the character
offset in a string given a horizontal cursor position. It currently has
no early exits, but can do so for no string or empty string. For negative
position values (so left of the string), do not exit out with zero but
instead act as if it were zero to ensure we test against the first glyph,
which might not be part of the character.
2024-04-15 11:23:14 -07:00