diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index c5ff7445b036..b6532d245b90 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -518,18 +518,6 @@ struct ImpContentLessCompare : public ::std::binary_function< ImpContent, ImpCon } }; -struct ImpContentMixLessCompare : public ::std::binary_function< ImpContent, sal_uInt64, bool> -{ - inline bool operator() (const ImpContent& lhs, const sal_uInt64& rhs) const - { - return lhs.nTypeAndId < rhs; - } - inline bool operator() (const sal_uInt64& lhs, const ImpContent& rhs) const - { - return lhs < rhs.nTypeAndId; - } -}; - static ResHookProc pImplResHookProc = 0; InternalResMgr::InternalResMgr( const OUString& rFileURL, @@ -667,12 +655,13 @@ sal_Bool InternalResMgr::Create() sal_Bool InternalResMgr::IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const { // Anfang der Strings suchen - sal_uInt64 nValue = ((sal_uInt64(nRT) << 32) | nId); + ImpContent aValue; + aValue.nTypeAndId = ((sal_uInt64(nRT) << 32) | nId); ImpContent * pFind = ::std::lower_bound(pContent, pContent + nEntries, - nValue, - ImpContentMixLessCompare()); - return (pFind != (pContent + nEntries)) && (pFind->nTypeAndId == nValue); + aValue, + ImpContentLessCompare()); + return (pFind != (pContent + nEntries)) && (pFind->nTypeAndId == aValue.nTypeAndId); } // ----------------------------------------------------------------------- @@ -685,13 +674,14 @@ void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId, pResUseDump->erase( (sal_uInt64(nRT) << 32) | nId ); #endif // Anfang der Strings suchen - sal_uInt64 nValue = ((sal_uInt64(nRT) << 32) | nId); + ImpContent aValue; + aValue.nTypeAndId = ((sal_uInt64(nRT) << 32) | nId); ImpContent* pEnd = (pContent + nEntries); ImpContent* pFind = ::std::lower_bound( pContent, pEnd, - nValue, - ImpContentMixLessCompare()); - if( pFind && (pFind != pEnd) && (pFind->nTypeAndId == nValue) ) + aValue, + ImpContentLessCompare()); + if( pFind && (pFind != pEnd) && (pFind->nTypeAndId == aValue.nTypeAndId) ) { if( nRT == RSC_STRING && bEqual2Content ) {