summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-11 11:16:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-11 17:11:11 +0200
commitd6500b19afc6a15e63e679765317690eac0d4207 (patch)
tree6be682a83fd64ff59721c85d2929f8826b097632 /sc
parent2d6790377abc3b364773845e6dab8717be7eee16 (diff)
-Werror,-Wunused-private-field (SC_TOKEN_FIX_MEMBERS -> ScRawTokenBase)
Change-Id: If9172eaed5ef1bf853e6e29cc81141f226aac264
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/compiler.hxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index c7031b8901b4..32a54f8202f7 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -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: