summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-13 14:33:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-21 09:14:45 +0200
commit841e1a6f3619054ecc9240e061cd83d4e41d1ca9 (patch)
tree2ee3989b2d3291c9b276205492d43369827ca3cf /include/tools
parent4354f0e9ef4a5538729a2a6f2d1745e247f6c5cd (diff)
remove some old MSVC workarounds
Change-Id: I6abd8aaffb27b3c85df7c0518f7f576be4e32222 Reviewed-on: https://gerrit.libreoffice.org/36660 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/ref.hxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx
index bb32d486339e..5116c73bd5b5 100644
--- a/include/tools/ref.hxx
+++ b/include/tools/ref.hxx
@@ -122,22 +122,21 @@ class TOOLS_DLLPUBLIC SvRefBase
// work around a clang 3.5 optimization bug: if the bNoDelete is *first*
// it mis-compiles "if (--nRefCount == 0)" and never deletes any object
unsigned int nRefCount : 31;
- // the only reason this is not bool is because MSVC cannot handle mixed type bitfields
- unsigned int bNoDelete : 1;
+ bool bNoDelete : 1;
protected:
virtual ~SvRefBase();
public:
- SvRefBase() : nRefCount(0), bNoDelete(1) {}
+ SvRefBase() : nRefCount(0), bNoDelete(true) {}
- SvRefBase(const SvRefBase &) : nRefCount(0), bNoDelete(1) {}
+ SvRefBase(const SvRefBase &) : nRefCount(0), bNoDelete(true) {}
SvRefBase & operator = ( const SvRefBase & )
{ return *this; }
void RestoreNoDelete()
- { bNoDelete = 1; }
+ { bNoDelete = true; }
void AddNextRef()
{
@@ -149,7 +148,7 @@ public:
{
assert( nRefCount < (1 << 30) && "Do not add refs to dead objects" );
if( bNoDelete )
- bNoDelete = 0;
+ bNoDelete = false;
++nRefCount;
}