mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-30 10:04:24 +01:00
[set] Tweak move operators a bit
Should be equivalent.
This commit is contained in:
1 parent
8dc072d20d
commit
c81198b5bc
2 files changed
+5
-5
No files matched your search
@@ -38,10 +38,10 @@ struct hb_bit_set_invertible_t
|
||||
bool inverted = false;
|
||||
|
||||
hb_bit_set_invertible_t () = default;
|
||||
hb_bit_set_invertible_t (hb_bit_set_invertible_t& o) = default;
|
||||
hb_bit_set_invertible_t (hb_bit_set_invertible_t&& o) = default;
|
||||
hb_bit_set_invertible_t (const hb_bit_set_invertible_t& o) = default;
|
||||
hb_bit_set_invertible_t (hb_bit_set_invertible_t&& other) : hb_bit_set_invertible_t () { hb_swap (*this, other); }
|
||||
hb_bit_set_invertible_t& operator= (const hb_bit_set_invertible_t& o) = default;
|
||||
hb_bit_set_invertible_t& operator= (hb_bit_set_invertible_t&& o) = default;
|
||||
hb_bit_set_invertible_t& operator= (hb_bit_set_invertible_t&& other) { hb_swap (*this, other); return *this; }
|
||||
friend void swap (hb_bit_set_invertible_t &a, hb_bit_set_invertible_t &b)
|
||||
{
|
||||
if (likely (!a.s.successful || !b.s.successful))
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ 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= (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<hb_codepoint_t> lst) : hb_sparseset_t ()
|
||||
@@ -53,7 +53,7 @@ struct hb_sparseset_t
|
||||
add (item);
|
||||
}
|
||||
template <typename Iterable,
|
||||
hb_requires (hb_is_iterable (Iterable))>
|
||||
hb_requires (hb_is_iterable (Iterable))>
|
||||
hb_sparseset_t (const Iterable &o) : hb_sparseset_t ()
|
||||
{
|
||||
hb_copy (o, *this);
|
||||
|
||||
Reference in new issue
Block a user