diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-04 21:08:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-07 14:16:58 +0000 |
commit | fe73f2098ed9aa8bee1da5cba98353549384d642 (patch) | |
tree | 7398876fdb68398490e20975f78c4d2b463ce65a /sw/inc/ring.hxx | |
parent | 46c9f1e247e0e3d16c82566783344a2389fa4543 (diff) |
effectively expand init_header into member init list
this is all that init_header does anyway
Change-Id: If1607ab25b43bd313d2d2f1da65c20fc87ae7951
Diffstat (limited to 'sw/inc/ring.hxx')
-rw-r--r-- | sw/inc/ring.hxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx index b4cb4a0a8cfa..59c39814d9b3 100644 --- a/sw/inc/ring.hxx +++ b/sw/inc/ring.hxx @@ -65,8 +65,9 @@ namespace sw * are alone in one. */ Ring() - : pPrev(static_cast< value_type* >(this)) - { algo::init_header(static_cast< value_type* >(this)); } + : pNext(static_cast< value_type* >(this)) + , pPrev(static_cast< value_type* >(this)) + { } /** * Creates a new item and add it to an existing ring container. * Note: the newly created item will be inserted just before item pRing. @@ -120,13 +121,14 @@ namespace sw template <typename value_type> inline Ring<value_type>::Ring( value_type* pObj ) - : pPrev(static_cast< value_type* >(this)) + : pNext(static_cast< value_type* >(this)) + , pPrev(static_cast< value_type* >(this)) { - value_type* pThis = static_cast< value_type* >(this); - if( !pObj ) - algo::init_header(pThis); - else + if( pObj ) + { + value_type* pThis = static_cast< value_type* >(this); algo::link_before(pObj, pThis); + } } template <typename value_type> |