summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-09-15 12:57:10 +0300
committerTor Lillqvist <tlillqvist@suse.com>2011-09-15 13:14:38 +0300
commiteab413f96302b75a8dddd73db613ad1c3f0a2551 (patch)
treed9e246f591f8eb03d3a90eb9ef629312e9d3baf8 /connectivity
parent8ab026ef9e3589442e67a22f7a67f828f5ba754c (diff)
Make this compile with MSVC and _DEBUG
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx20
1 files changed, 4 insertions, 16 deletions
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index be2df41e1744..261d02057bf8 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -235,21 +235,6 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
};
/// and STL argorithm compatible predicate comparing a DriverAccess' impl name to a string
- struct CompareDriverAccessToName : public ::std::binary_function< DriverAccess, ::rtl::OUString, bool >
- {
- //.................................................................
- bool operator()( const DriverAccess& lhs, const ::rtl::OUString& rhs )
- {
- return lhs.sImplementationName < rhs ? true : false;
- }
- //.................................................................
- bool operator()( const ::rtl::OUString& lhs, const DriverAccess& rhs )
- {
- return lhs < rhs.sImplementationName ? true : false;
- }
- };
-
- /// and STL argorithm compatible predicate comparing a DriverAccess' impl name to a string
struct EqualDriverAccessToName : public ::std::binary_function< DriverAccess, ::rtl::OUString, bool >
{
::rtl::OUString m_sImplName;
@@ -393,9 +378,12 @@ void OSDBCDriverManager::initializeDriverPrecedence()
for ( ; ( pDriverOrder < pDriverOrderEnd ) && ( aNoPrefDriversStart != m_aDriversBS.end() ); ++pDriverOrder )
{
+ DriverAccess driver_order;
+ driver_order.sImplementationName = *pDriverOrder;
+
// look for the impl name in the DriverAccess array
::std::pair< DriverAccessArrayIterator, DriverAccessArrayIterator > aPos =
- ::std::equal_range( aNoPrefDriversStart, m_aDriversBS.end(), *pDriverOrder, CompareDriverAccessToName() );
+ ::std::equal_range( aNoPrefDriversStart, m_aDriversBS.end(), driver_order, CompareDriverAccessByName() );
if ( aPos.first != aPos.second )
{ // we have a DriverAccess with this impl name