Replace most uses of is_inert with is_immutable
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 5a8152e..1a5547b 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc
@@ -217,7 +217,7 @@ void hb_buffer_t::reset (void) { - if (unlikely (hb_object_is_inert (this))) + if (unlikely (hb_object_is_immutable (this))) return; hb_unicode_funcs_destroy (unicode); @@ -232,7 +232,7 @@ void hb_buffer_t::clear (void) { - if (unlikely (hb_object_is_inert (this))) + if (unlikely (hb_object_is_immutable (this))) return; hb_segment_properties_t default_props = HB_SEGMENT_PROPERTIES_DEFAULT; @@ -289,7 +289,7 @@ void hb_buffer_t::remove_output (void) { - if (unlikely (hb_object_is_inert (this))) + if (unlikely (hb_object_is_immutable (this))) return; have_output = false; @@ -302,7 +302,7 @@ void hb_buffer_t::clear_output (void) { - if (unlikely (hb_object_is_inert (this))) + if (unlikely (hb_object_is_immutable (this))) return; have_output = true; @@ -315,7 +315,7 @@ void hb_buffer_t::clear_positions (void) { - if (unlikely (hb_object_is_inert (this))) + if (unlikely (hb_object_is_immutable (this))) return; have_output = false; @@ -873,7 +873,7 @@ hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, hb_unicode_funcs_t *unicode_funcs) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; if (!unicode_funcs) @@ -920,7 +920,7 @@ hb_direction_t direction) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; buffer->props.direction = direction; @@ -964,7 +964,7 @@ hb_buffer_set_script (hb_buffer_t *buffer, hb_script_t script) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; buffer->props.script = script; @@ -1008,7 +1008,7 @@ hb_buffer_set_language (hb_buffer_t *buffer, hb_language_t language) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; buffer->props.language = language; @@ -1046,7 +1046,7 @@ hb_buffer_set_segment_properties (hb_buffer_t *buffer, const hb_segment_properties_t *props) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; buffer->props = *props; @@ -1082,7 +1082,7 @@ hb_buffer_set_flags (hb_buffer_t *buffer, hb_buffer_flags_t flags) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; buffer->flags = flags; @@ -1118,7 +1118,7 @@ hb_buffer_set_cluster_level (hb_buffer_t *buffer, hb_buffer_cluster_level_t cluster_level) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; buffer->cluster_level = cluster_level; @@ -1157,7 +1157,7 @@ hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, hb_codepoint_t replacement) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; buffer->replacement = replacement; @@ -1197,7 +1197,7 @@ hb_buffer_set_invisible_glyph (hb_buffer_t *buffer, hb_codepoint_t invisible) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; buffer->invisible = invisible; @@ -1329,7 +1329,7 @@ hb_buffer_set_length (hb_buffer_t *buffer, unsigned int length) { - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return length == 0; if (!buffer->ensure (length)) @@ -1535,7 +1535,7 @@ assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE || (!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID)); - if (unlikely (hb_object_is_inert (buffer))) + if (unlikely (hb_object_is_immutable (buffer))) return; if (text_length == -1)
diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 184db49..893a876 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc
@@ -353,7 +353,7 @@ hb_font_t *font = hb_font_create (face); hb_face_destroy (face); - if (unlikely (hb_object_is_inert (font))) + if (unlikely (hb_object_is_immutable (font))) return font; hb_font_set_ptem (font, coretext_font_size_to_ptem (CTFontGetSize(ct_font)));
diff --git a/src/hb-font.cc b/src/hb-font.cc index 567cded..b24995b 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc
@@ -1377,7 +1377,7 @@ hb_font_t *font = _hb_font_create (parent->face); - if (unlikely (hb_object_is_inert (font))) + if (unlikely (hb_object_is_immutable (font))) return font; font->parent = hb_font_reference (parent);
diff --git a/src/hb-set.hh b/src/hb-set.hh index 947e8d9..21a2252 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh
@@ -225,15 +225,17 @@ return true; } - inline void clear (void) { - if (unlikely (hb_object_is_inert (this))) + inline void clear (void) + { + if (unlikely (hb_object_is_immutable (this))) return; successful = true; population = 0; page_map.resize (0); pages.resize (0); } - inline bool is_empty (void) const { + inline bool is_empty (void) const + { unsigned int count = pages.len; for (unsigned int i = 0; i < count; i++) if (!pages[i].is_empty ())
diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc index 4648cc7..8d002f8 100644 --- a/src/hb-shape-plan.cc +++ b/src/hb-shape-plan.cc
@@ -343,7 +343,7 @@ if (unlikely (!buffer->len)) return true; - assert (!hb_object_is_inert (buffer)); + assert (!hb_object_is_immutable (buffer)); assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE); if (unlikely (hb_object_is_inert (shape_plan)))