Port objects to use header.writable instead of immutable
Saves 4 or 8 bytes per object on 64bit archs.
diff --git a/src/hb-blob.cc b/src/hb-blob.cc
index 51f22ce..4b036e8 100644
--- a/src/hb-blob.cc
+++ b/src/hb-blob.cc
@@ -57,8 +57,6 @@
{
HB_OBJECT_HEADER_STATIC,
- true, /* immutable */
-
nullptr, /* data */
0, /* length */
HB_MEMORY_MODE_READONLY, /* mode */
@@ -299,12 +297,10 @@
void
hb_blob_make_immutable (hb_blob_t *blob)
{
- if (hb_object_is_inert (blob))
- return;
- if (blob->immutable)
+ if (hb_object_is_immutable (blob))
return;
- blob->immutable = true;
+ hb_object_make_immutable (blob);
}
/**
@@ -320,7 +316,7 @@
hb_bool_t
hb_blob_is_immutable (hb_blob_t *blob)
{
- return blob->immutable;
+ return hb_object_is_immutable (blob);
}
@@ -454,7 +450,7 @@
bool
hb_blob_t::try_make_writable (void)
{
- if (this->immutable)
+ if (hb_object_is_immutable (this))
return false;
if (this->mode == HB_MEMORY_MODE_WRITABLE)