diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-01-28 19:05:59 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-01-28 19:12:15 +0100 |
commit | 9ad661e5740142a95893e91e4c138caee2abe7c2 (patch) | |
tree | 5dd171947d22d245bd75aa8bed59dcb92fefbc94 /svl/source/items | |
parent | 4651402a5399e00f62311bb3fe545413b0818a2d (diff) |
SfxPoolItem: fix annoying -Werror=shadow the hard way
... by properly prefixing the members.
Change-Id: Idfdb93b19bf9fdd5309fb55d4e7e56da81ee822a
Diffstat (limited to 'svl/source/items')
-rw-r--r-- | svl/source/items/itemset.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/poolitem.cxx | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 27f2a8d6dd08..dbe5140eaf83 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -417,7 +417,7 @@ sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich ) // #i32448# // Take care of disabled items, too. - if(!pItemToClear->nWhich) + if (!pItemToClear->m_nWhich) { // item is disabled, delete it delete pItemToClear; diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 3ac1e7bebfc3..532107f7b14f 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -50,13 +50,13 @@ const char* pw5 = "Wow! 10.000.000 items!"; IMPL_PTRHINT(SfxPoolItemHint,SfxPoolItem) // SfxPoolItem ----------------------------------------------------------- -SfxPoolItem::SfxPoolItem( sal_uInt16 nW ) - : nRefCount( 0 ), - nWhich( nW ) - , nKind( 0 ) +SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich) + : m_nRefCount(0) + , m_nWhich(nWhich) + , m_nKind(0) { DBG_CTOR(SfxPoolItem, 0); - DBG_ASSERT(nW <= SHRT_MAX, "Which Bereich ueberschritten"); + DBG_ASSERT(nWhich <= SHRT_MAX, "invalid WhichId"); #if OSL_DEBUG_LEVEL > 1 ++nItemCount; if ( pw1 && nItemCount>=10000 ) @@ -89,9 +89,9 @@ SfxPoolItem::SfxPoolItem( sal_uInt16 nW ) // ----------------------------------------------------------------------- SfxPoolItem::SfxPoolItem( const SfxPoolItem& rCpy ) - : nRefCount( 0 ), // wird ja ein neues Object! - nWhich( rCpy.Which() ) // Funktion rufen wg. ChkThis() - , nKind( 0 ) + : m_nRefCount(0) // don't copy that + , m_nWhich(rCpy.Which()) // call function because of ChkThis() (WTF does that mean?) + , m_nKind( 0 ) { DBG_CTOR(SfxPoolItem, 0); #if OSL_DEBUG_LEVEL > 1 @@ -128,7 +128,8 @@ SfxPoolItem::SfxPoolItem( const SfxPoolItem& rCpy ) SfxPoolItem::~SfxPoolItem() { DBG_DTOR(SfxPoolItem, 0); - DBG_ASSERT(nRefCount == 0 || nRefCount > SFX_ITEMS_MAXREF, "destroying item in use" ); + DBG_ASSERT(m_nRefCount == 0 || m_nRefCount > SFX_ITEMS_MAXREF, + "destroying item in use"); #if OSL_DEBUG_LEVEL > 1 --nItemCount; #endif |