cid#1586676 Big parameter passed by value
Change-Id: I803788650dda6947a62724fd936b4ed733efbd58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162390 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
parent
f46477e934
commit
4e7a0270c6
2 changed files with 25 additions and 0 deletions
1
external/frozen/UnpackedTarball_frozen.mk
vendored
1
external/frozen/UnpackedTarball_frozen.mk
vendored
|
@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,frozen,$(FROZEN_TARBALL)))
|
|||
$(eval $(call gb_UnpackedTarball_add_patches,frozen,\
|
||||
external/frozen/defines_h_constexpr_string.patch.0 \
|
||||
external/frozen/cid1532449_use_move_ctor.0 \
|
||||
external/frozen/cid1586676_use_move_ctor.0 \
|
||||
external/frozen/cid1538304_reference_ctor.0 \
|
||||
))
|
||||
|
||||
|
|
24
external/frozen/cid1586676_use_move_ctor.0
vendored
Normal file
24
external/frozen/cid1586676_use_move_ctor.0
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
--- include/frozen/unordered_set.h 2024-01-22 10:42:57.125966099 +0000
|
||||
+++ include/frozen/unordered_set.h 2024-01-22 10:46:07.701159961 +0000
|
||||
@@ -74,13 +74,19 @@
|
||||
public:
|
||||
/* constructors */
|
||||
unordered_set(unordered_set const &) = default;
|
||||
- constexpr unordered_set(container_type keys, Hash const &hash,
|
||||
+ constexpr unordered_set(container_type&& keys, Hash const &hash,
|
||||
+ KeyEqual const &equal)
|
||||
+ : equal_{equal}
|
||||
+ , keys_{std::move(keys)}
|
||||
+ , tables_{bits::make_pmh_tables<storage_size>(
|
||||
+ keys_, hash, bits::Get{}, default_prg_t{})} {}
|
||||
+ constexpr unordered_set(const container_type& keys, Hash const &hash,
|
||||
KeyEqual const &equal)
|
||||
: equal_{equal}
|
||||
, keys_{keys}
|
||||
, tables_{bits::make_pmh_tables<storage_size>(
|
||||
keys_, hash, bits::Get{}, default_prg_t{})} {}
|
||||
- explicit constexpr unordered_set(container_type keys)
|
||||
+ explicit constexpr unordered_set(const container_type& keys)
|
||||
: unordered_set{keys, Hash{}, KeyEqual{}} {}
|
||||
|
||||
constexpr unordered_set(std::initializer_list<Key> keys)
|
Loading…
Reference in a new issue