Say for USHORT, we were implementing casts from and to unsigned. With this change, we cast from and to uint16_t only. This allows compiler more opportunities to catch possible narrowing issues in the code. It needed a couple of fixes in the codebase though, because previously, if a USHORT was participating in arithmetic with signed numbers, eg. "u + 1", the result would have been unsigned. With this change, it would be signed. The correct fix is to update the code to read "u + 1u". That said, I think about conditionally adding back the cast out to signed/unsigned, to facilitate better type deduction. But I couldn't think of a real situation where that would help with anything. So I didn't add. Here's what it was: template <typename Type2 = hb_conditional<hb_is_signed (Type), signed, unsigned>, hb_enable_if (sizeof (Type) < sizeof (Type2))> operator hb_type_identity_t<Type2> () const { return v; } https://github.com/harfbuzz/harfbuzz/pull/2875 |
||
---|---|---|
.ci | ||
.circleci | ||
.github/workflows | ||
docs | ||
m4 | ||
perf | ||
src | ||
subprojects | ||
test | ||
util | ||
.clang-format | ||
.codecov.yml | ||
.editorconfig | ||
AUTHORS | ||
BUILD.md | ||
CMakeLists.txt | ||
CONFIG.md | ||
COPYING | ||
Makefile.am | ||
NEWS | ||
README | ||
README.md | ||
README.mingw.md | ||
README.python.md | ||
RELEASING.md | ||
TESTING.md | ||
THANKS | ||
TODO | ||
autogen.sh | ||
configure.ac | ||
git.mk | ||
harfbuzz.doap | ||
meson.build | ||
meson_options.txt | ||
mingw-configure.sh | ||
replace-enum-strings.cmake |
README.md
This is HarfBuzz, a text shaping library.
For bug reports, mailing list, and other information please visit:
For license information, see COPYING.
For build information, see BUILD.md.
For custom configurations, see CONFIG.md.
For test execution, see TESTING.md.
Documentation: https://harfbuzz.github.io