Do not copy etc. singular iterator values.
This also reverts previous attempts at fixing this, commits33839f90e6
"ucb: try to fix weird STL assertion on tinderbox" and6506af86b5
"ucb: second try to fix weird STL assertion on tinderbox." Change-Id: I89d0eb87fbd164c0a4cf24d60f225767cb2bfc1a
This commit is contained in:
parent
34dfde5576
commit
9631f96aca
3 changed files with 55 additions and 10 deletions
|
@ -399,7 +399,7 @@ UniversalContentBroker::registerContentProvider(
|
|||
{
|
||||
osl::MutexGuard aGuard(m_aMutex);
|
||||
|
||||
ProviderMap_Impl::iterator aIt(m_aProviders.end());
|
||||
ProviderMap_Impl::iterator aIt;
|
||||
try
|
||||
{
|
||||
aIt = m_aProviders.find(Scheme);
|
||||
|
@ -445,7 +445,7 @@ void SAL_CALL UniversalContentBroker::deregisterContentProvider(
|
|||
{
|
||||
osl::MutexGuard aGuard(m_aMutex);
|
||||
|
||||
ProviderMap_Impl::iterator aMapIt(m_aProviders.end());
|
||||
ProviderMap_Impl::iterator aMapIt;
|
||||
try
|
||||
{
|
||||
aMapIt = m_aProviders.find(Scheme);
|
||||
|
|
|
@ -101,6 +101,8 @@ class RegexpMapIter: public RegexpMapConstIter< Val >
|
|||
friend class RegexpMap< Val >; // to access ctor
|
||||
|
||||
public:
|
||||
RegexpMapIter() {}
|
||||
|
||||
RegexpMapIter & operator ++();
|
||||
|
||||
RegexpMapIter operator ++(int);
|
||||
|
|
|
@ -74,11 +74,19 @@ public:
|
|||
typedef RegexpMapImpl< Val > MapImpl;
|
||||
typedef typename List< Val >::iterator ListIterator;
|
||||
|
||||
// Solaris needs these for the ctor...
|
||||
|
||||
inline RegexpMapIterImpl();
|
||||
|
||||
inline RegexpMapIterImpl(MapImpl * pTheMap, int nTheList,
|
||||
ListIterator aTheIndex);
|
||||
|
||||
RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap, bool bBegin);
|
||||
|
||||
RegexpMapIterImpl(RegexpMapIterImpl const & rOther);
|
||||
|
||||
RegexpMapIterImpl & operator =(RegexpMapIterImpl const & rOther);
|
||||
|
||||
bool operator ==(RegexpMapIterImpl const & rOther) const;
|
||||
|
||||
RegexpMapImpl< Val > const * getMap() const { return m_pMap; }
|
||||
|
@ -92,8 +100,6 @@ public:
|
|||
RegexpMapEntry< Val > & get();
|
||||
|
||||
private:
|
||||
RegexpMapIterImpl(); // not implemented
|
||||
|
||||
mutable RegexpMapEntry< Val > m_aEntry;
|
||||
typename List< Val >::iterator m_aIndex;
|
||||
RegexpMapImpl< Val > * m_pMap;
|
||||
|
@ -105,6 +111,14 @@ private:
|
|||
|
||||
}
|
||||
|
||||
template< typename Val >
|
||||
inline RegexpMapIterImpl< Val >::RegexpMapIterImpl():
|
||||
m_aEntry(rtl::OUString(), 0),
|
||||
m_pMap(0),
|
||||
m_nList(-1),
|
||||
m_bEntrySet(false)
|
||||
{}
|
||||
|
||||
template< typename Val >
|
||||
inline RegexpMapIterImpl< Val >::RegexpMapIterImpl(MapImpl * pTheMap,
|
||||
int nTheList,
|
||||
|
@ -134,11 +148,10 @@ void RegexpMapIterImpl< Val >::setEntry() const
|
|||
//============================================================================
|
||||
template< typename Val >
|
||||
RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap,
|
||||
bool bBegin)
|
||||
: m_aEntry(rtl::OUString(), 0)
|
||||
, m_aIndex(pTheMap->m_aList[Regexp::KIND_DOMAIN].end())
|
||||
, m_pMap(pTheMap)
|
||||
, m_bEntrySet(false)
|
||||
bool bBegin):
|
||||
m_aEntry(rtl::OUString(), 0),
|
||||
m_pMap(pTheMap),
|
||||
m_bEntrySet(false)
|
||||
{
|
||||
if (bBegin)
|
||||
{
|
||||
|
@ -149,9 +162,39 @@ RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap,
|
|||
else
|
||||
{
|
||||
m_nList = Regexp::KIND_DOMAIN;
|
||||
m_aIndex = m_pMap->m_aList[Regexp::KIND_DOMAIN].end();
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
template< typename Val >
|
||||
RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapIterImpl const & rOther):
|
||||
m_aEntry(rOther.m_aEntry), m_pMap(rOther.m_pMap), m_nList(rOther.m_nList),
|
||||
m_bEntrySet(rOther.m_bEntrySet)
|
||||
{
|
||||
if (m_nList != -1)
|
||||
m_aIndex = rOther.m_aIndex;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
template< typename Val >
|
||||
RegexpMapIterImpl< Val > & RegexpMapIterImpl< Val >::operator =(
|
||||
RegexpMapIterImpl const & rOther)
|
||||
{
|
||||
if (this != &rOther)
|
||||
{
|
||||
m_aEntry = rOther.m_aEntry;
|
||||
m_pMap = rOther.m_pMap;
|
||||
m_nList = rOther.m_nList;
|
||||
m_bEntrySet = rOther.m_bEntrySet;
|
||||
if (m_nList == -1)
|
||||
m_aIndex = typename List< Val >::iterator();
|
||||
else
|
||||
m_aIndex = rOther.m_aIndex;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
template< typename Val >
|
||||
bool RegexpMapIterImpl< Val >::operator ==(RegexpMapIterImpl const & rOther)
|
||||
|
@ -159,7 +202,7 @@ bool RegexpMapIterImpl< Val >::operator ==(RegexpMapIterImpl const & rOther)
|
|||
{
|
||||
return m_pMap == rOther.m_pMap
|
||||
&& m_nList == rOther.m_nList
|
||||
&& m_aIndex == rOther.m_aIndex;
|
||||
&& (m_nList == -1 || m_aIndex == rOther.m_aIndex);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
Loading…
Reference in a new issue