From 1bddeb974ff0c08332c8225f6f5b5bd45bcddfdc Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 16 Feb 2024 23:20:54 +0700 Subject: [PATCH] Use literal bools when possible rather than ints. --- src/hb-buffer-verify.cc | 4 ++-- src/hb-ot-cmap-table.hh | 2 +- src/hb-ot-stat-table.hh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-buffer-verify.cc b/src/hb-buffer-verify.cc index 15a53919d..671d6eda8 100644 --- a/src/hb-buffer-verify.cc +++ b/src/hb-buffer-verify.cc @@ -149,7 +149,7 @@ buffer_verify_unsafe_to_break (hb_buffer_t *buffer, } assert (text_start < text_end); - if (0) + if (false) printf("start %u end %u text start %u end %u\n", start, end, text_start, text_end); hb_buffer_clear_contents (fragment); @@ -288,7 +288,7 @@ buffer_verify_unsafe_to_concat (hb_buffer_t *buffer, } assert (text_start < text_end); - if (0) + if (false) printf("start %u end %u text start %u end %u\n", start, end, text_start, text_end); #if 0 diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 9d4c05894..64d2b1388 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -1979,7 +1979,7 @@ struct cmap hb_codepoint_t *glyph, cache_t *cache = nullptr) const { - if (unlikely (!this->get_glyph_funcZ)) return 0; + if (unlikely (!this->get_glyph_funcZ)) return false; return _cached_get (unicode, glyph, cache); } diff --git a/src/hb-ot-stat-table.hh b/src/hb-ot-stat-table.hh index c6c2b7511..3ffcc0b4c 100644 --- a/src/hb-ot-stat-table.hh +++ b/src/hb-ot-stat-table.hh @@ -357,7 +357,7 @@ struct AxisValue case 2: return u.format2.get_value (); case 3: return u.format3.get_value (); case 4: return u.format4.get_axis_record (axis_index).get_value (); - default:return 0; + default:return false; } }