summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-05-29 20:31:08 +0200
committerMichael Stahl <mstahl@redhat.com>2013-05-29 23:52:13 +0200
commit526fbddf6935b0a3983563af71c4ccea4561cebb (patch)
tree5f01cee53e187ff3059f181c39a580ab3752548e /connectivity
parent713cfaf98425e048963e8044be25cc0aa0840b28 (diff)
connectivity: make MSVC happy with pairFirstLess
MSVC 2008 with _DEBUG calls this with parameters in wrong order so needs more overloads. Change-Id: I334fd93bea278dc147b3b575d079cacf02de5e87
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index a6b5a67d9ce2..4a81462d0ffb 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -755,10 +755,23 @@ void OFlatTable::refreshHeader()
// -----------------------------------------------------------------------------
namespace
{
- template< typename Tp, typename Te> bool pairFirstLess(const Tp &p, const Te &e)
+ template< typename Tp, typename Te> struct PairFirstLess
{
- return p.first < e;
- }
+ bool operator() (const Tp &p, const Te &e)
+ {
+ return p.first < e;
+ }
+#ifdef DBG_UTIL
+ bool operator() (const Te &e, const Tp &p)
+ {
+ return e < p.first;
+ }
+ bool operator() (const Tp &p1, const Tp &p2)
+ {
+ return p1.first < p2.first;
+ }
+#endif
+ };
}
// -----------------------------------------------------------------------------
sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos)
@@ -896,7 +909,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int
vector< TRowPositionInFile >::const_iterator aFind = lower_bound(m_aRowPosToFilePos.begin(),
m_aRowPosToFilePos.end(),
nOffset,
- pairFirstLess< TRowPositionInFile, sal_Int32 >);
+ PairFirstLess< TRowPositionInFile, sal_Int32 >());
if(aFind == m_aRowPosToFilePos.end() || aFind->first != nOffset)
//invalid bookmark