summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2025-01-25 20:20:52 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2025-01-25 22:38:58 +0100
commitd81fc1367653bba68ea08906364d3792dffc4596 (patch)
tree3f57d474b88b3201ba968297d73905fc7f9f0c77 /sc/inc
parent5e03f4d40c14cc79b1f3f790955196a31eec5d3c (diff)
Resolves: tdf#164853 find_if causing copy
the pred param of: const std::pair<QueryKey, QueryCriteriaAndResult>& doesn't exactly match what the arg should be, which is const std::pair<const QueryKey, QueryCriteriaAndResult>& so an unecessary copy is silently created, add and use some typedefs to make this more straightforward. seen with: perf record -e mem_load_l3_hit_retired.xsnp_fwd -e mem_load_l3_hit_retired.xsnp_miss on profiling specifically for contested accesses, see tma_contested_accesses in perf -v Change-Id: I1d1a57e49a0f2af8bc57ca22ac4572c0246c719b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180753 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/lookupcache.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx
index 00194ebd162c..bc50045f06a8 100644
--- a/sc/inc/lookupcache.hxx
+++ b/sc/inc/lookupcache.hxx
@@ -203,7 +203,8 @@ private:
}
};
- std::unordered_map< QueryKey, QueryCriteriaAndResult, QueryKey::Hash > maQueryMap;
+ typedef std::unordered_map<QueryKey, QueryCriteriaAndResult, QueryKey::Hash> QueryMap;
+ QueryMap maQueryMap;
ScRange maRange;
ScDocument * mpDoc;
ScLookupCacheMap & mCacheMap;