Kaydet (Commit) d6500b19 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-Werror,-Wunused-private-field (SC_TOKEN_FIX_MEMBERS -> ScRawTokenBase)

Change-Id: If9172eaed5ef1bf853e6e29cc81141f226aac264
üst 2d679037
......@@ -101,16 +101,17 @@ class ScTokenArray;
bool bRaw; // not cloned yet and trimmed to real size
*/
#define SC_TOKEN_FIX_MEMBERS \
OpCode eOp; \
formula::StackVar eType; \
mutable sal_uInt16 nRefCnt; \
struct ScRawTokenBase
{
protected:
OpCode eOp;
formula::StackVar eType;
mutable sal_uInt16 nRefCnt;
bool bRaw;
};
struct ScDoubleRawToken
struct ScDoubleRawToken: private ScRawTokenBase
{
private:
SC_TOKEN_FIX_MEMBERS
public:
union
{ // union only to assure alignment identical to ScRawToken
......@@ -123,15 +124,13 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL( ScDoubleRawToken );
};
struct ScRawToken
struct ScRawToken: private ScRawTokenBase
{
friend class ScCompiler;
// Friends that use a temporary ScRawToken on the stack (and therefor need
// the private dtor) and know what they're doing..
friend class ScTokenArray;
friend sal_uInt16 lcl_ScRawTokenOffset();
private:
SC_TOKEN_FIX_MEMBERS
public:
union {
double nValue;
......@@ -160,7 +159,7 @@ public:
};
//! other members not initialized
ScRawToken() : bRaw( true ) {}
ScRawToken() { bRaw = true; }
private:
~ScRawToken() {} //! only delete via Delete()
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment