Kaydet (Commit) b13a822f authored tarafından Kohei Yoshida's avatar Kohei Yoshida

ScRawTokenRef is now based on intrusive_ptr.

üst f7e9694b
......@@ -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
{
......
......@@ -36,7 +36,6 @@
#include "formula/opcode.hxx"
#include "refdata.hxx"
#include "scmatrix.hxx"
#include "formula/intruref.hxx"
#include <tools/mempool.hxx>
#include "scdllapi.h"
#include "formula/IFunctionDescription.hxx"
......
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