[mutex] Add constructor/destructor

Use in one place.
This commit is contained in:
Behdad Esfahbod committed 2023-01-12 14:52:00 -07:00
1 parent 8e71f7e8ed
commit 449f6df762
2 files changed
+4 -6

No files matched your search

+3
View File
@@ -97,6 +97,9 @@ struct hb_mutex_t
/* Create space for, but do not initialize m. */
alignas(hb_mutex_impl_t) char m[sizeof (hb_mutex_impl_t)];
hb_mutex_t () { init (); }
~hb_mutex_t () { fini (); }
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
void init () { hb_mutex_impl_init ((hb_mutex_impl_t *) m); }
+1 -6
View File
@@ -88,10 +88,7 @@ struct hb_subset_accelerator_t
destroy_cmap_cache(nullptr),
has_seac(has_seac_),
cff_accelerator(nullptr),
destroy_cff_accelerator(nullptr)
{
sanitized_table_cache_lock.init ();
}
destroy_cff_accelerator(nullptr) {}
~hb_subset_accelerator_t ()
{
@@ -100,8 +97,6 @@ struct hb_subset_accelerator_t
if (cmap_cache && destroy_cmap_cache)
destroy_cmap_cache ((void*) cmap_cache);
sanitized_table_cache_lock.fini ();
}
// Generic