diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-10-26 09:18:34 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-10-26 09:19:09 -0500 |
commit | 0e73ffc339ff51fc610de5fcbad0aef813610f36 (patch) | |
tree | 83cadb17dedd1d51d293b60a660466b793729b0c /svl/inc | |
parent | 3e3b809f5832b6e571ce5b016b743d7b8aa4bf27 (diff) |
Surely every target processor know how to do logical shift left efficiently
Diffstat (limited to 'svl/inc')
-rw-r--r-- | svl/inc/svl/flagitem.hxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/svl/inc/svl/flagitem.hxx b/svl/inc/svl/flagitem.hxx index cb5d43377235..5e4e025322f2 100644 --- a/svl/inc/svl/flagitem.hxx +++ b/svl/inc/svl/flagitem.hxx @@ -35,8 +35,6 @@ class SvStream; -extern sal_uInt16 nSfxFlagVal[16]; - // ----------------------------------------------------------------------- DBG_NAMEEX_VISIBILITY(SfxFlagItem, SVL_DLLPUBLIC) @@ -72,9 +70,8 @@ public: DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nVal = nNewVal; } - int GetFlag( sal_uInt8 nFlag ) const { - return ( (nVal & nSfxFlagVal[nFlag]) != 0 ); } - void SetFlag( sal_uInt8 nFlag, int bVal ); + bool GetFlag( sal_uInt8 nFlag ) const { return ( (nVal & ( 1<<nFlag))); } + void SetFlag( sal_uInt8 nFlag, bool bVal ) { if(bVal) { nVal |= (1<<nFlag); } else { nVal &= ~(1<<nFlag);};} }; #endif |