From 8206569d6373a0fe97602788c7a43a0cf1f0345a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 11 Jan 2023 13:24:50 -0700 Subject: [PATCH] [map] Remove hashmap create/destroy/vtable Unused now. --- src/hb-map.hh | 32 -------------------------------- src/test-map.cc | 10 ---------- 2 files changed, 42 deletions(-) diff --git a/src/hb-map.hh b/src/hb-map.hh index fbc5fecb2..615d1825e 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -494,37 +494,5 @@ struct hb_map_t : hb_hashmap_t -static inline -hb_hashmap_t* hb_hashmap_create () -{ - using hashmap = hb_hashmap_t; - hashmap* map; - if (!(map = hb_object_create ())) - return nullptr; - - return map; -} - -template -static inline -void hb_hashmap_destroy (hb_hashmap_t* map) -{ - if (!hb_object_destroy (map)) - return; - - hb_free (map); -} - -namespace hb { - -template -struct vtable> -{ - static constexpr auto destroy = hb_hashmap_destroy; -}; - -} - #endif /* HB_MAP_HH */ diff --git a/src/test-map.cc b/src/test-map.cc index 5716930db..a0a59cbcd 100644 --- a/src/test-map.cc +++ b/src/test-map.cc @@ -237,16 +237,6 @@ main (int argc, char **argv) m.keys_ref (); m.values_ref (); } - /* Test more complex unique_ptr's. */ - { - hb_hashmap_t>> m; - - m.get (0); - const hb::unique_ptr> *v1; - m.has (0, &v1); - hb::unique_ptr> *v2; - m.has (0, &v2); - } /* Test hashmap with complex shared_ptrs as keys. */ { hb_hashmap_t, unsigned> m;