summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-03-12 13:08:09 +0000
committerEike Rathke <erack@redhat.com>2024-04-14 16:10:53 +0200
commitcce100f72dda8f5d4ae0c75c69a81603dc62e247 (patch)
treecc6a3e83ee80ae44d14553cc6cd40093227c1dc7
parentacb6430800fccd120765110a3822c422fbc9a19d (diff)
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.mcnamara@collabora.com> (cherry picked from commit e5548dceb9086a6f0c8fa70bce8de6da0be72e40) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165713 Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/core/inc/interpre.hxx6
1 files changed, 6 insertions, 0 deletions
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;