sc/source/core/inc/interpre.hxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit cce100f72dda8f5d4ae0c75c69a81603dc62e247 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Mar 12 13:08:09 2024 +0000 Commit: Eike Rathke <er...@redhat.com> CommitDate: Sun Apr 14 16:10:53 2024 +0200 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/+/164713 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit e5548dceb9086a6f0c8fa70bce8de6da0be72e40) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165713 Reviewed-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 64b9a8ae5b2c..ab456a4dca86 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -131,6 +131,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;