this is copied from SvRefBase, so copy the clang opt fix here too
Change-Id: Ia3a2f086d66b5e15ddd4e7dcc600271d19e5d052
This commit is contained in:
@@ -56,7 +56,6 @@ ONDXKey::ONDXKey(const OUString& aStr, sal_uInt32 nRec)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec)
|
ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec)
|
||||||
: ONDXKey_BASE(css::sdbc::DataType::DOUBLE)
|
: ONDXKey_BASE(css::sdbc::DataType::DOUBLE)
|
||||||
,nRecord(nRec)
|
,nRecord(nRec)
|
||||||
@@ -64,24 +63,21 @@ ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// index page
|
// index page
|
||||||
|
|
||||||
ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent)
|
ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent)
|
||||||
:bNoDelete(1)
|
: nRefCount(0)
|
||||||
,nRefCount(0)
|
, bNoDelete(1)
|
||||||
,nPagePos(nPos)
|
, nPagePos(nPos)
|
||||||
,bModified(false)
|
, bModified(false)
|
||||||
,nCount(0)
|
, nCount(0)
|
||||||
,aParent(pParent)
|
, aParent(pParent)
|
||||||
,rIndex(rInd)
|
, rIndex(rInd)
|
||||||
,ppNodes(nullptr)
|
, ppNodes(nullptr)
|
||||||
{
|
{
|
||||||
sal_uInt16 nT = rIndex.getHeader().db_maxkeys;
|
sal_uInt16 nT = rIndex.getHeader().db_maxkeys;
|
||||||
ppNodes = new ONDXNode[nT];
|
ppNodes = new ONDXNode[nT];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ONDXPage::~ONDXPage()
|
ONDXPage::~ONDXPage()
|
||||||
{
|
{
|
||||||
delete[] ppNodes;
|
delete[] ppNodes;
|
||||||
|
@@ -115,9 +115,11 @@ namespace connectivity
|
|||||||
friend SvStream& WriteONDXPage(SvStream &rStream, const ONDXPage&);
|
friend SvStream& WriteONDXPage(SvStream &rStream, const ONDXPage&);
|
||||||
friend SvStream& operator >> (SvStream &rStream, ONDXPage&);
|
friend SvStream& operator >> (SvStream &rStream, ONDXPage&);
|
||||||
|
|
||||||
|
// 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
|
// the only reason this is not bool is because MSVC cannot handle mixed type bitfields
|
||||||
unsigned int bNoDelete : 1;
|
unsigned int bNoDelete : 1;
|
||||||
unsigned int nRefCount : 31;
|
|
||||||
sal_uInt32 nPagePos; // Position in the index file
|
sal_uInt32 nPagePos; // Position in the index file
|
||||||
bool bModified : 1;
|
bool bModified : 1;
|
||||||
sal_uInt16 nCount;
|
sal_uInt16 nCount;
|
||||||
|
Reference in New Issue
Block a user