cid#1538304 Big parameter passed by value

and

cid#1538309 Big parameter passed by value

Change-Id: I6c3f86c3c57f561b71809d0193ab663d2f92a4b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154794
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2023-07-23 11:54:08 +02:00
parent cb78012a9b
commit a7181c0b38
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -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/cid1538304_reference_ctor.0 \
))
# vim: set noet sw=4 ts=4:
+16
View File
@@ -0,0 +1,16 @@
--- include/frozen/map.h 2023-07-22 20:20:19.580400347 +0100
+++ include/frozen/map.h 2023-07-22 20:25:44.893704485 +0100
@@ -94,11 +94,11 @@
public:
/* constructors */
- constexpr map(container_type items, Compare const &compare)
+ constexpr map(const container_type& items, Compare const &compare)
: less_than_{compare}
, items_{bits::quicksort(items, less_than_)} {}
- explicit constexpr map(container_type items)
+ explicit constexpr map(const container_type& items)
: map{items, Compare{}} {}
constexpr map(std::initializer_list<value_type> items, Compare const &compare)