From 523ea68050bb0a979133708d95cb9ebf43302839 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 21 May 2022 02:44:01 +0000 Subject: harfbuzz 4.3.0 git-svn-id: svn://tug.org/texlive/trunk@63353 c570f23f-e606-0410-a88d-b1316a301751 --- .../libs/harfbuzz/harfbuzz-src/src/hb-set.hh | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh') diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh index 1f054078692..60256263637 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh @@ -43,8 +43,8 @@ struct hb_sparseset_t hb_sparseset_t (const hb_sparseset_t& other) : hb_sparseset_t () { set (other); } hb_sparseset_t (hb_sparseset_t&& other) : hb_sparseset_t () { s = std::move (other.s); } - hb_sparseset_t& operator= (const hb_sparseset_t& other) { set (other); return *this; } - hb_sparseset_t& operator= (hb_sparseset_t&& other) { hb_swap (*this, other); return *this; } + hb_sparseset_t& operator = (const hb_sparseset_t& other) { set (other); return *this; } + hb_sparseset_t& operator = (hb_sparseset_t&& other) { s = std::move (other.s); return *this; } friend void swap (hb_sparseset_t& a, hb_sparseset_t& b) { hb_swap (a.s, b.s); } hb_sparseset_t (std::initializer_list lst) : hb_sparseset_t () @@ -53,7 +53,7 @@ struct hb_sparseset_t add (item); } template + hb_requires (hb_is_iterable (Iterable))> hb_sparseset_t (const Iterable &o) : hb_sparseset_t () { hb_copy (o, *this); @@ -77,10 +77,12 @@ struct hb_sparseset_t void err () { s.err (); } bool in_error () const { return s.in_error (); } + void alloc (unsigned sz) { s.alloc (sz); } void reset () { s.reset (); } void clear () { s.clear (); } void invert () { s.invert (); } bool is_empty () const { return s.is_empty (); } + uint32_t hash () const { return s.hash (); } void add (hb_codepoint_t g) { s.add (g); } bool add_range (hb_codepoint_t a, hb_codepoint_t b) { return s.add_range (a, b); } @@ -125,6 +127,8 @@ struct hb_sparseset_t void set (const hb_sparseset_t &other) { s.set (other.s); } bool is_equal (const hb_sparseset_t &other) const { return s.is_equal (other.s); } + bool operator == (const hb_set_t &other) const { return is_equal (other); } + bool operator != (const hb_set_t &other) const { return !is_equal (other); } bool is_subset (const hb_sparseset_t &larger_set) const { return s.is_subset (larger_set.s); } @@ -158,15 +162,19 @@ struct hb_sparseset_t struct hb_set_t : hb_sparseset_t { - hb_set_t () = default; + using sparseset = hb_sparseset_t; + ~hb_set_t () = default; - hb_set_t (hb_set_t&) = default; - hb_set_t& operator= (const hb_set_t&) = default; - hb_set_t& operator= (hb_set_t&&) = default; - hb_set_t (std::initializer_list lst) : hb_sparseset_t (lst) {} + hb_set_t () : sparseset () {}; + hb_set_t (std::nullptr_t) : hb_set_t () {}; + hb_set_t (const hb_set_t &o) : sparseset ((sparseset &) o) {}; + hb_set_t (hb_set_t&& o) : sparseset (std::move ((sparseset &) o)) {} + hb_set_t& operator = (const hb_set_t&) = default; + hb_set_t& operator = (hb_set_t&&) = default; + hb_set_t (std::initializer_list lst) : sparseset (lst) {} template - hb_set_t (const Iterable &o) : hb_sparseset_t (o) {} + hb_set_t (const Iterable &o) : sparseset (o) {} }; static_assert (hb_set_t::INVALID == HB_SET_VALUE_INVALID, ""); -- cgit v1.2.3