summaryrefslogtreecommitdiff
path: root/sw/inc/ring.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-02-13 15:06:16 +0100
committerMichael Stahl <mstahl@redhat.com>2015-02-16 22:26:44 +0100
commit54e93460a53629c9428d3ed129a32f052b6bdd7e (patch)
treef6269d12beeddbf6f3642b0bd406f1b18b0218e7 /sw/inc/ring.hxx
parentb6e43aac665d700d3474bb757afd7be492f65d2a (diff)
(related: tdf#80715) sw: fix Ring::MoveTo() not doing anything...
... if the parameter is currently in the same list. The "boost::intrusive::circular_list_algorithms::transfer" has a precondition that the 2 parameters must not be in the same list. This causes an infinite loop in SwFindParaText::Find(), which is hiding the infinite loop that i'm trying to debug... While at it, remove some unnecessary complexity. Change-Id: Ib41f52c6d5c44ecc358c6170ee1e6e98729e1302
Diffstat (limited to 'sw/inc/ring.hxx')
-rw-r--r--sw/inc/ring.hxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx
index e0bfc5a30b90..9f70061e9725 100644
--- a/sw/inc/ring.hxx
+++ b/sw/inc/ring.hxx
@@ -135,16 +135,12 @@ namespace sw
inline void Ring<value_type>::MoveTo(value_type* pDestRing)
{
value_type* pThis = static_cast< value_type* >(this);
+ algo::unlink(pThis);
// insert into "new"
- if( pDestRing )
+ if (pDestRing)
{
- if(algo::unique(pThis))
- algo::link_before(pDestRing, pThis);
- else
- algo::transfer(pDestRing, pThis);
+ algo::link_before(pDestRing, pThis);
}
- else
- algo::unlink(pThis);
}
/**