diff options
-rw-r--r-- | sc/inc/compiler.hxx | 21 |
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: |