mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 06:51:01 +01:00
[mutex] Add constructor/destructor
Use in one place.
This commit is contained in:
1 parent
8e71f7e8ed
commit
449f6df762
2 files changed
+4
-6
No files matched your search
@@ -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); }
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user