Page MenuHome

BLF Cleanup: Use FreeType Enum FT_Err_Ok
ClosedPublic

Authored by Harley Acheson (harley) on Feb 8 2022, 6:50 PM.

Details

Summary

Replace comparisons of FT_Error against 0 with FT_Err_Ok instead.


Most FreeType functions return an FT_Error, which is an int under the hood. But it should always contain one of their enums, not arbitrary values. They define a value for success as FT_Err_Ok, but we have some places where we use its value of 0 instead. This could be confusing as some FreeType functions do return integers (like FT_Get_Char_Index).

So this patch only replaces our comparisons of FT_Error against zero to using FT_Err_Ok instead.

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.Feb 8 2022, 6:50 PM
Harley Acheson (harley) created this revision.
This revision is now accepted and ready to land.Mar 24 2022, 11:49 PM
This revision was automatically updated to reflect the committed changes.