Replace most uses of is_inert with is_immutable
This commit is contained in:
parent
0589787ff5
commit
93ef20a83b
@ -217,7 +217,7 @@ hb_buffer_t::get_scratch_buffer (unsigned int *size)
|
||||
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 @@ hb_buffer_t::reset (void)
|
||||
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 @@ hb_buffer_t::add_info (const hb_glyph_info_t &glyph_info)
|
||||
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 @@ hb_buffer_t::remove_output (void)
|
||||
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 @@ hb_buffer_t::clear_output (void)
|
||||
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 @@ void
|
||||
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_buffer_set_direction (hb_buffer_t *buffer,
|
||||
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 @@ void
|
||||
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 @@ void
|
||||
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 @@ void
|
||||
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 @@ void
|
||||
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 @@ void
|
||||
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 @@ void
|
||||
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 @@ void
|
||||
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_bool_t
|
||||
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 @@ hb_buffer_add_utf (hb_buffer_t *buffer,
|
||||
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)
|
||||
|
@ -353,7 +353,7 @@ hb_coretext_font_create (CTFontRef ct_font)
|
||||
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)));
|
||||
|
@ -1377,7 +1377,7 @@ hb_font_create_sub_font (hb_font_t *parent)
|
||||
|
||||
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);
|
||||
|
@ -225,15 +225,17 @@ struct hb_set_t
|
||||
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 ())
|
||||
|
@ -343,7 +343,7 @@ hb_shape_plan_execute (hb_shape_plan_t *shape_plan,
|
||||
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)))
|
||||
|
Loading…
Reference in New Issue
Block a user