sc/source/core/inc/interpre.hxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit e5548dceb9086a6f0c8fa70bce8de6da0be72e40 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Mar 12 13:08:09 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Mar 12 16:23:24 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/+/164713 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index ebff66afafe0..a5b25dad13dc 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -182,6 +182,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;