summaryrefslogtreecommitdiff
path: root/sc/inc/compiler.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-12-21 19:33:40 -0500
committerKohei Yoshida <kyoshida@novell.com>2010-12-21 19:33:40 -0500
commitb13a822f43316959260b4275b4c6c682bdd8ab71 (patch)
tree669a69adc38b86c9987a3ff439e9084905843ef1 /sc/inc/compiler.hxx
parentf7e9694be4d3c7d4a1bb16cf1620acf1473e650d (diff)
ScRawTokenRef is now based on intrusive_ptr.
Diffstat (limited to 'sc/inc/compiler.hxx')
-rw-r--r--sc/inc/compiler.hxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index cfd92b28b1df..f38abc562d4f 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -38,7 +38,6 @@
#include "global.hxx"
#include "refdata.hxx"
#include "formula/token.hxx"
-#include "formula/intruref.hxx"
#include "formula/grammar.hxx"
#include <unotools/charclass.hxx>
#include <rtl/ustrbuf.hxx>
@@ -47,8 +46,7 @@
#include <formula/FormulaCompiler.hxx>
-
-#include <boost/shared_ptr.hpp>
+#include <boost/intrusive_ptr.hpp>
#ifndef INCLUDED_HASH_MAP
#include <hash_map>
@@ -111,7 +109,7 @@ class ScTokenArray;
#define SC_TOKEN_FIX_MEMBERS \
OpCode eOp; \
formula::StackVar eType; \
- USHORT nRefCnt; \
+ mutable USHORT nRefCnt; \
BOOL bRaw;
struct ScDoubleRawToken
@@ -203,8 +201,17 @@ public:
{ return GetStrLenBytes( GetStrLen( pStr ) ); }
};
+inline void intrusive_ptr_add_ref(ScRawToken* p)
+{
+ p->IncRef();
+}
+
+inline void intrusive_ptr_release(ScRawToken* p)
+{
+ p->DecRef();
+}
-typedef formula::SimpleIntrusiveReference< struct ScRawToken > ScRawTokenRef;
+typedef ::boost::intrusive_ptr<ScRawToken> ScRawTokenRef;
class SC_DLLPUBLIC ScCompiler : public formula::FormulaCompiler
{