sc/source/core/inc/interpre.hxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 70f7c8c4cc7882faf6993c3ad9264943410f2f27 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Mar 12 13:08:09 2024 +0000 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Mar 13 09:59:16 2024 +0100 tdf#160056 don't need to create a boost::intrusive_ptr to do search with more recent c++ versions we can elide that construction for the purposes of this comparison Change-Id: I6a88219ef4451d2775b3b7ab1d9cf8adfb53e04d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164686 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index ffaac09e1d89..f33f548640f2 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -132,6 +132,12 @@ struct FormulaTokenRef_less { bool operator () ( const formula::FormulaConstTokenRef& r1, const formula::FormulaConstTokenRef& r2 ) const { return r1.get() < r2.get(); } + // So we don't have to create a FormulaConstTokenRef to search by formula::FormulaToken* + using is_transparent = void; + bool operator () ( const formula::FormulaToken* p1, const formula::FormulaConstTokenRef& r2 ) const + { return p1 < r2.get(); } + bool operator () ( const formula::FormulaConstTokenRef& r1, const formula::FormulaToken* p2 ) const + { return r1.get() < p2; } }; typedef ::std::map< const formula::FormulaConstTokenRef, formula::FormulaConstTokenRef, FormulaTokenRef_less> ScTokenMatrixMap;