[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11590: Remove use of boost::intrusi
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11590: Remove use of boost::intrusive_ptr with DisplayObjects in function returns. |
Date: |
Mon, 26 Oct 2009 12:18:26 +0100 |
User-agent: |
Bazaar (1.16.1) |
------------------------------------------------------------
revno: 11590 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2009-10-26 12:18:26 +0100
message:
Remove use of boost::intrusive_ptr with DisplayObjects in function returns.
modified:
libcore/DisplayList.cpp
libcore/DisplayList.h
libcore/DisplayObject.cpp
libcore/DisplayObject.h
libcore/MovieClip.cpp
libcore/MovieClip.h
libcore/asobj/flash/display/MovieClip_as.cpp
libcore/vm/ExecutableCode.h
=== modified file 'libcore/DisplayList.cpp'
--- a/libcore/DisplayList.cpp 2009-10-12 09:42:13 +0000
+++ b/libcore/DisplayList.cpp 2009-10-26 10:12:17 +0000
@@ -64,7 +64,7 @@
DepthEquals(int depth) : _depth(depth) {}
bool operator() (const DisplayItem& item) {
- if ( ! item.get() ) return false;
+ if (!item) return false;
return item->get_depth() == _depth;
}
@@ -93,7 +93,7 @@
DepthGreaterOrEqual(int depth) : _depth(depth) {}
bool operator() (const DisplayItem& item) {
- if ( ! item.get() ) return false;
+ if (!item) return false;
return item->get_depth() >= _depth;
}
private:
@@ -107,7 +107,7 @@
NameEquals(const std::string& name) : _name(name) {}
bool operator() (const DisplayItem& item) {
- if ( ! item.get() ) return false;
+ if (!item) return false;
return item->get_name() == _name;
}
@@ -122,7 +122,7 @@
NameEqualsNoCase(const std::string& name) : _name(name) {}
bool operator() (const DisplayItem& item) {
- if ( ! item.get() ) return false;
+ if (!item) return false;
return _noCaseEquals(item->get_name(), _name);
}
@@ -142,7 +142,7 @@
for (const_iterator it = _charsByDepth.begin(),
itEnd = _charsByDepth.end(); it != itEnd; ++it) {
- DisplayObject* ch = it->get();
+ DisplayObject* ch = *it;
int chdepth = ch->get_depth();
if (chdepth >= nexthighestdepth) {
@@ -160,7 +160,7 @@
for (iterator it = _charsByDepth.begin(), itEnd = _charsByDepth.end();
it != itEnd; ++it) {
- DisplayObject* ch = it->get();
+ DisplayObject* ch = *it;
// found
if (ch->get_depth() == depth) return ch;
@@ -186,7 +186,7 @@
if (it == e) return 0;
- return it->get();
+ return *it;
}
@@ -202,7 +202,7 @@
if ( it == e ) return NULL;
- return it->get();
+ return *it;
}
void
@@ -227,7 +227,7 @@
(*it)->add_invalidated_bounds(old_ranges, true);
// make a copy (before replacing)
- boost::intrusive_ptr<DisplayObject> oldCh = *it;
+ DisplayObject* oldCh = *it;
// replace existing char (before calling unload!)
*it = DisplayItem(ch);
@@ -288,7 +288,7 @@
}
else {
// Make a copy (before replacing)
- boost::intrusive_ptr<DisplayObject> oldch = *it;
+ DisplayObject* oldch = *it;
InvalidatedRanges old_ranges;
@@ -391,7 +391,7 @@
if (it != _charsByDepth.end()) {
// Make a copy (before erasing)
- boost::intrusive_ptr<DisplayObject> oldCh = *it;
+ DisplayObject* oldCh = *it;
// Erase (before calling unload)
_charsByDepth.erase(it);
@@ -502,7 +502,7 @@
if (it == _charsByDepth.end()) return 0;
- DisplayObject* obj = it->get();
+ DisplayObject* obj = *it;
_charsByDepth.erase(it);
return obj;
}
@@ -659,7 +659,7 @@
iterator it = beginNonRemoved(_charsByDepth);
for (iterator endIt = _charsByDepth.end(); it != endIt; ++it)
{
- DisplayObject* ch = it->get();
+ DisplayObject* ch = *it;
DisplayObject* mask = ch->getMask();
if (mask && ch->visible() && ! mask->unloaded())
@@ -738,7 +738,7 @@
{
iterator it = beginNonRemoved(_charsByDepth);
for (iterator endIt = _charsByDepth.end(); it != endIt; ++it) {
- DisplayObject* ch = it->get();
+ DisplayObject* ch = *it;
ch->omit_display();
}
}
@@ -912,13 +912,13 @@
{
iterator itOldBackup = itOld;
- boost::intrusive_ptr<DisplayObject> chOld = itOldBackup->get();
+ DisplayObject* chOld = *itOldBackup;
int depthOld = chOld->get_depth();
while (itNew != itNewEnd) {
iterator itNewBackup = itNew;
- boost::intrusive_ptr<DisplayObject> chNew = itNewBackup->get();
+ DisplayObject* chNew = *itNewBackup;
int depthNew = chNew->get_depth();
// depth in old list is occupied, and empty in new list.
@@ -986,7 +986,7 @@
// unload remaining DisplayObjects directly.
while((itOld != itOldEnd) && ((*itOld)->get_depth() < 0)) {
- boost::intrusive_ptr<DisplayObject> chOld = itOld->get();
+ DisplayObject* chOld = *itOld;
itOld = _charsByDepth.erase(itOld);
if (chOld->unload()) reinsertRemovedCharacter(chOld);
@@ -1003,7 +1003,7 @@
// old display list, and clear the new display list
for (itNew = newList._charsByDepth.begin(); itNew != itNewEnd; ++itNew) {
- boost::intrusive_ptr<DisplayObject> chNew = itNew->get();
+ DisplayObject* chNew = *itNew;
int depthNew = chNew->get_depth();
if (chNew->unloaded()) {
@@ -1023,7 +1023,7 @@
for (iterator i = newList._charsByDepth.begin(),
e = newList._charsByDepth.end(); i != e; ++i) {
- DisplayObject* ch = (*i).get();
+ DisplayObject* ch = *i;
if (!ch->unloaded()) {
iterator found =
@@ -1049,7 +1049,7 @@
void
-DisplayList::reinsertRemovedCharacter(boost::intrusive_ptr<DisplayObject> ch)
+DisplayList::reinsertRemovedCharacter(DisplayObject* ch)
{
assert(ch->unloaded());
testInvariant();
=== modified file 'libcore/DisplayList.h'
--- a/libcore/DisplayList.h 2009-07-10 15:44:55 +0000
+++ b/libcore/DisplayList.h 2009-10-26 10:12:17 +0000
@@ -46,7 +46,7 @@
namespace gnash {
/// A DisplayItem is simply a DisplayObject object
-typedef boost::intrusive_ptr<DisplayObject> DisplayItem;
+typedef DisplayObject* DisplayItem;
/// A list of on-stage DisplayObjects, ordered by depth
//
@@ -373,7 +373,7 @@
for (const_iterator it = nonRemoved(),
itEnd = _charsByDepth.end(); it != itEnd; ++it) {
- boost::intrusive_ptr<DisplayObject> ch = *it;
+ DisplayObject* ch = *it;
int depth = ch->get_depth();
if (!depths.insert(depth).second) {
log_debug("Depth %d is duplicated in
DisplayList %p",
@@ -399,7 +399,7 @@
///
/// TODO: inspect what should happen if the target depth is already
/// occupied
- void reinsertRemovedCharacter(boost::intrusive_ptr<DisplayObject> ch);
+ void reinsertRemovedCharacter(DisplayObject* ch);
container_type _charsByDepth;
@@ -415,7 +415,7 @@
it != itEnd; ++it) {
DisplayItem& di = *it;
- if (!visitor(di.get())) break;
+ if (!visitor(di)) break;
}
}
@@ -427,7 +427,7 @@
itEnd = _charsByDepth.rend(); it != itEnd; ++it) {
DisplayItem& di = *it;
- if (!visitor(di.get())) break;
+ if (!visitor(di)) break;
}
}
@@ -439,7 +439,7 @@
itEnd = _charsByDepth.rend(); it != itEnd; ++it) {
const DisplayItem& di = *it;
- if (!visitor(di.get())) break;
+ if (!visitor(di)) break;
}
}
@@ -450,7 +450,7 @@
for (iterator it = _charsByDepth.begin(), itEnd = _charsByDepth.end();
it != itEnd; ++it) {
- visitor(it->get());
+ visitor(*it);
}
}
@@ -461,7 +461,7 @@
for (const_iterator it = _charsByDepth.begin(),
itEnd = _charsByDepth.end(); it != itEnd; ++it) {
- visitor(it->get());
+ visitor(*it);
}
}
=== modified file 'libcore/DisplayObject.cpp'
--- a/libcore/DisplayObject.cpp 2009-10-26 08:22:49 +0000
+++ b/libcore/DisplayObject.cpp 2009-10-26 10:12:17 +0000
@@ -79,7 +79,7 @@
DisplayObject::DisplayObject(DisplayObject* parent)
:
- m_parent(parent),
+ _parent(parent),
m_invalidated(true),
m_child_invalidated(true),
m_depth(0),
@@ -118,10 +118,10 @@
DisplayObject::getWorldMatrix(bool includeRoot) const
{
SWFMatrix m;
- if (m_parent) {
- m = m_parent->getWorldMatrix(includeRoot);
+ if (_parent) {
+ m = _parent->getWorldMatrix(includeRoot);
}
- if (m_parent || includeRoot) m.concatenate(getMatrix());
+ if (_parent || includeRoot) m.concatenate(getMatrix());
return m;
}
@@ -130,9 +130,9 @@
DisplayObject::getWorldVolume() const
{
int volume=_volume;
- if (m_parent != NULL)
+ if (_parent != NULL)
{
- volume = int(volume*m_parent->getVolume()/100.0);
+ volume = int(volume*_parent->getVolume()/100.0);
}
return volume;
@@ -142,9 +142,9 @@
DisplayObject::get_world_cxform() const
{
cxform m;
- if (m_parent != NULL)
+ if (_parent != NULL)
{
- m = m_parent->get_world_cxform();
+ m = _parent->get_world_cxform();
}
m.concatenate(get_cxform());
@@ -173,7 +173,7 @@
// Set the invalidated-flag of the parent. Note this does not mean that
// the parent must re-draw itself, it just means that one of it's childs
// needs to be re-drawn.
- if ( m_parent ) m_parent->set_child_invalidated();
+ if ( _parent ) _parent->set_child_invalidated();
// Ok, at this point the instance will change it's
// visual aspect after the
@@ -223,7 +223,7 @@
if ( ! m_child_invalidated )
{
m_child_invalidated=true;
- if ( m_parent ) m_parent->set_child_invalidated();
+ if ( _parent ) _parent->set_child_invalidated();
}
}
@@ -242,7 +242,7 @@
as_value
DisplayObject::blendMode(const fn_call& fn)
{
- boost::intrusive_ptr<DisplayObject> ch = ensure<ThisIs<DisplayObject>
>(fn);
+ DisplayObject* ch = ensure<ThisIs<DisplayObject> >(fn);
// This is AS-correct, but doesn't do anything.
// TODO: implement in the renderers!
@@ -446,7 +446,7 @@
#ifndef GNASH_USE_GC
assert(get_ref_count() > 0);
#endif // GNASH_USE_GC
- boost::intrusive_ptr<DisplayObject> this_ptr =
const_cast<DisplayObject*>(this);
+ DisplayObject* this_ptr = const_cast<DisplayObject*>(this);
handler.reset( new EventCode(this_ptr, it->second) );
return handler;
@@ -476,8 +476,7 @@
{
movie_root& root = getRoot(*this);
- std::auto_ptr<ExecutableCode> event(
- new QueuedEvent(boost::intrusive_ptr<DisplayObject>(this), id));
+ std::auto_ptr<ExecutableCode> event(new QueuedEvent(this, id));
root.pushAction(event, lvl);
}
@@ -739,7 +738,7 @@
void
DisplayObject::markDisplayObjectReachable() const
{
- if ( m_parent ) m_parent->setReachable();
+ if ( _parent ) _parent->setReachable();
if (_mask) _mask->setReachable();
if (_maskee) _maskee->setReachable();
markAsObjectReachable();
=== modified file 'libcore/DisplayObject.h'
--- a/libcore/DisplayObject.h 2009-10-26 08:22:49 +0000
+++ b/libcore/DisplayObject.h 2009-10-26 10:12:17 +0000
@@ -183,8 +183,8 @@
// MovieClip must override this
// and any other DisplayObject will have
// a parent!
- assert(m_parent != NULL);
- return m_parent->get_environment();
+ assert(_parent != NULL);
+ return _parent->get_environment();
}
/// \brief
@@ -192,7 +192,7 @@
/// the DisplayObject has no parent.
DisplayObject* get_parent() const
{
- return m_parent.get();
+ return _parent;
}
/// Set the parent of this DisplayObject
@@ -201,7 +201,7 @@
/// a parent. In AS2, this is only used for external movies
void set_parent(DisplayObject* parent)
{
- m_parent = parent;
+ _parent = parent;
}
int get_depth() const { return m_depth; }
@@ -685,8 +685,8 @@
DisplayObject* getClosestASReferenceableAncestor()
{
if ( isActionScriptReferenceable() ) return this;
- assert(m_parent);
- return m_parent->getClosestASReferenceableAncestor();
+ assert(_parent);
+ return _parent->getClosestASReferenceableAncestor();
}
const DisplayObject* getClosestASReferenceableAncestor() const
@@ -1028,7 +1028,7 @@
/// Name of this DisplayObject (if any)
std::string _name;
- boost::intrusive_ptr<DisplayObject> m_parent;
+ DisplayObject* _parent;
/// look for '.', 'this', '..', '_parent', '_level0' and '_root'
//
=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp 2009-10-23 06:25:25 +0000
+++ b/libcore/MovieClip.cpp 2009-10-26 10:20:25 +0000
@@ -507,7 +507,7 @@
for (TextFields::const_iterator i=etc->begin(), e=etc->end();
i!=e; ++i)
{
- boost::intrusive_ptr<TextField> tf = i->get();
+ TextField* tf = *i;
if ( tf->getTextDefined() )
{
val = tf->get_text_value();
@@ -607,13 +607,12 @@
}
-boost::intrusive_ptr<MovieClip>
+MovieClip*
MovieClip::duplicateMovieClip(const std::string& newname, int depth,
as_object* initObject)
{
DisplayObject* parent_ch = get_parent();
- if ( ! parent_ch )
- {
+ if (!parent_ch) {
log_error(_("Can't clone root of the movie"));
return NULL;
}
@@ -624,8 +623,7 @@
return NULL;
}
- boost::intrusive_ptr<MovieClip> newmovieclip = new MovieClip(_def.get(),
- _swf, parent);
+ MovieClip* newmovieclip = new MovieClip(_def.get(), _swf, parent);
newmovieclip->set_name(newname);
newmovieclip->setDynamic();
@@ -643,7 +641,7 @@
newmovieclip->set_ratio(get_ratio());
newmovieclip->set_clip_depth(get_clip_depth());
- parent->_displayList.placeDisplayObject(newmovieclip.get(), depth,
+ parent->_displayList.placeDisplayObject(newmovieclip, depth,
initObject);
return newmovieclip;
@@ -671,7 +669,6 @@
bool
MovieClip::notifyEvent(const event_id& id)
{
- testInvariant();
#ifdef GNASH_DEBUG
log_debug(_("Event %s invoked for movieclip %s"), id, getTarget());
@@ -708,7 +705,6 @@
// user-defined onInitialize is never called
if ( id.id() == event_id::INITIALIZE ) {
- testInvariant();
return called;
}
@@ -758,7 +754,6 @@
"LOAD event (is not dynamic, has a parent, "
"no registered class and no clip events defined)"),
getTarget(), get_depth());
- testInvariant();
#endif
return called;
} while (0);
@@ -783,8 +778,6 @@
// which unload handlers of parent and childs is performed
// and wheter unload of child can access members of parent.
- testInvariant();
-
return called;
}
@@ -966,8 +959,7 @@
log_debug(_("Queuing init actions in frame %d of movieclip %s"),
_currentFrame, getTarget());
#endif
- std::auto_ptr<ExecutableCode> code (
- new GlobalCode(a, boost::intrusive_ptr<MovieClip>(this)) );
+ std::auto_ptr<ExecutableCode> code(new GlobalCode(a, this));
movie_root& root = getRoot(*this);
root.pushAction(code, movie_root::apINIT);
@@ -1023,7 +1015,6 @@
// and has no frames.
if (!_def) return;
- testInvariant();
assert(typeflags);
const PlayList* playlist = _def->getPlaylist(frame);
@@ -1064,7 +1055,6 @@
}
}
- testInvariant();
}
void
@@ -1287,7 +1277,7 @@
if (existing_char) return NULL;
- boost::intrusive_ptr<DisplayObject> ch = cdef->createDisplayObject(this);
+ DisplayObject* ch = cdef->createDisplayObject(this);
if (tag->hasName()) ch->set_name(tag->getName());
else if (ch->wantsInstanceName())
@@ -1315,8 +1305,8 @@
ch->set_ratio(tag->getRatio());
ch->set_clip_depth(tag->getClipDepth());
- dlist.placeDisplayObject(ch.get(), tag->getDepth());
- return ch.get();
+ dlist.placeDisplayObject(ch, tag->getDepth());
+ return ch;
}
void
@@ -1365,7 +1355,7 @@
return;
}
- boost::intrusive_ptr<DisplayObject> ch = cdef->createDisplayObject(this);
+ DisplayObject* ch = cdef->createDisplayObject(this);
// TODO: check if we can drop this for REPLACE!
// should we rename the DisplayObject when it's REPLACE tag?
@@ -1387,7 +1377,7 @@
}
// use SWFMatrix from the old DisplayObject if tag doesn't provide one.
- dlist.replaceDisplayObject(ch.get(), tag->getDepth(),
+ dlist.replaceDisplayObject(ch, tag->getDepth(),
!tag->hasCxform(), !tag->hasMatrix());
}
=== modified file 'libcore/MovieClip.h'
--- a/libcore/MovieClip.h 2009-10-21 07:10:41 +0000
+++ b/libcore/MovieClip.h 2009-10-26 10:20:25 +0000
@@ -576,8 +576,7 @@
/// @param init_object
/// If not null, will be used to copy properties over.
///
- boost::intrusive_ptr<MovieClip> duplicateMovieClip(
- const std::string& newname,
+ MovieClip* duplicateMovieClip(const std::string& newname,
int newdepth, as_object* init_object=NULL);
/// Dispatch event handler(s), if any.
@@ -612,17 +611,6 @@
return _displayList.getNextHighestDepth();
}
- void testInvariant() const {
- // _currentFrame may be 0, since this is our initial
- // condition. Still, frame count might be 0 as well, and
- // loaded frames too !
- //assert(_currentFrame < _def->get_frame_count());
-#ifndef GNASH_USE_GC
- assert(get_ref_count() > 0); // or we're constructed but
- // not stored in a boost::intrusive_ptr
-#endif
- }
-
/// Set the currently playing m_sound_stream_id
//
// TODO: rename to setStreamingSoundId
@@ -806,7 +794,7 @@
private:
- typedef std::vector<boost::intrusive_ptr<TextField> > TextFields;
+ typedef std::vector<TextField*> TextFields;
/// A container for textfields, indexed by their variable name
typedef std::map<std::string, TextFields> TextFieldIndex;
=== modified file 'libcore/asobj/flash/display/MovieClip_as.cpp'
--- a/libcore/asobj/flash/display/MovieClip_as.cpp 2009-10-23 06:25:25
+0000
+++ b/libcore/asobj/flash/display/MovieClip_as.cpp 2009-10-26 10:20:25
+0000
@@ -813,21 +813,20 @@
boost::int32_t depthValue = static_cast<boost::int32_t>(depth);
- boost::intrusive_ptr<MovieClip> ch;
+ MovieClip* ch;
// Copy members from initObject
if (fn.nargs == 3)
{
- boost::intrusive_ptr<as_object> initObject =
fn.arg(2).to_object(getGlobal(fn));
- ch = movieclip->duplicateMovieClip(newname, depthValue,
- initObject.get());
+ as_object* initObject = fn.arg(2).to_object(getGlobal(fn));
+ ch = movieclip->duplicateMovieClip(newname, depthValue, initObject);
}
else
{
ch = movieclip->duplicateMovieClip(newname, depthValue);
}
- return as_value(ch.get());
+ return as_value(ch);
}
as_value
@@ -1142,12 +1141,12 @@
const int depth = fn.arg(0).to_int();
- boost::intrusive_ptr<DisplayObject> ch =
mc->getDisplayObjectAtDepth(depth);
+ DisplayObject* ch = mc->getDisplayObjectAtDepth(depth);
// we want 'undefined', not 'null'
if (!ch) return as_value();
- return as_value(ch.get());
+ return as_value(ch);
}
/// MovieClip.getURL(url:String[, window:String[, method:String]])
@@ -1236,9 +1235,8 @@
if (!fn.nargs) return as_value(MovieClip::METHOD_NONE);
const as_value& v = fn.arg(0);
- boost::intrusive_ptr<as_object> o = v.to_object(getGlobal(fn));
- if ( ! o )
- {
+ as_object* o = v.to_object(getGlobal(fn));
+ if (!o) {
log_debug(_("meth(%s): first argument doesn't cast to object"), v);
return as_value(MovieClip::METHOD_NONE);
}
=== modified file 'libcore/vm/ExecutableCode.h'
--- a/libcore/vm/ExecutableCode.h 2009-10-07 11:54:54 +0000
+++ b/libcore/vm/ExecutableCode.h 2009-10-26 10:12:17 +0000
@@ -50,11 +50,11 @@
};
/// Global code (out of any function)
-class GlobalCode: public ExecutableCode {
+class GlobalCode : public ExecutableCode {
public:
- GlobalCode(const action_buffer& nBuffer,
boost::intrusive_ptr<DisplayObject> nTarget)
+ GlobalCode(const action_buffer& nBuffer, DisplayObject* nTarget)
:
buffer(nBuffer),
target(nTarget)
@@ -67,15 +67,10 @@
virtual void execute()
{
- if ( ! target->unloaded() )
- {
+ if (!target->unloaded()) {
ActionExec exec(buffer, target->get_environment());
exec();
}
- else
- {
- //log_debug("Sprite %s unloaded, won't execute global code in it",
target->getTargetPath().c_str());
- }
}
#ifdef GNASH_USE_GC
@@ -84,9 +79,8 @@
/// Reachable resources are:
/// - the action target (target)
///
- virtual void markReachableResources() const
- {
- if ( target ) target->setReachable();
+ virtual void markReachableResources() const {
+ if (target) target->setReachable();
}
#endif // GNASU_USE_GC
@@ -94,22 +88,22 @@
const action_buffer& buffer;
- boost::intrusive_ptr<DisplayObject> target;
+ DisplayObject* target;
};
/// Event code
-class EventCode: public ExecutableCode {
+class EventCode : public ExecutableCode {
public:
typedef std::vector<const action_buffer*> BufferList;
- EventCode(boost::intrusive_ptr<DisplayObject> nTarget)
+ EventCode(DisplayObject* nTarget)
:
_target(nTarget)
{}
- EventCode(boost::intrusive_ptr<DisplayObject> nTarget, const BufferList&
buffers)
+ EventCode(DisplayObject* nTarget, const BufferList& buffers)
:
_target(nTarget),
_buffers(buffers)
@@ -132,8 +126,7 @@
{
// don't push actions for destroyed DisplayObjects,
// our opcode guard is bogus at the moment.
- if( ! _target->isDestroyed() )
- {
+ if (!_target->isDestroyed()) {
_buffers.push_back(&buffer);
}
}
@@ -145,7 +138,7 @@
{
// onClipEvents code are guarded by isDestroyed(),
// still might be also guarded by unloaded()
- if( _target->isDestroyed() ) break;
+ if (_target->isDestroyed()) break;
ActionExec exec(*(*it), _target->get_environment(), false);
exec();
@@ -166,7 +159,7 @@
private:
- boost::intrusive_ptr<DisplayObject> _target;
+ DisplayObject* _target;
BufferList _buffers;
@@ -177,7 +170,7 @@
public:
- QueuedEvent(boost::intrusive_ptr<DisplayObject> nTarget, const event_id&
id)
+ QueuedEvent(DisplayObject* nTarget, const event_id& id)
:
_target(nTarget),
_eventId(id)
@@ -212,7 +205,7 @@
private:
- boost::intrusive_ptr<DisplayObject> _target;
+ DisplayObject* _target;
const event_id _eventId;
@@ -223,7 +216,7 @@
public:
- FunctionCode(boost::intrusive_ptr<as_function> nFunc,
boost::intrusive_ptr<DisplayObject> nTarget)
+ FunctionCode(as_function* nFunc, DisplayObject* nTarget)
:
func(nFunc),
target(nTarget)
@@ -236,8 +229,8 @@
virtual void execute()
{
- as_environment env(getVM(*func)); env.set_target(target.get());
- func->call(fn_call(target.get(), env));
+ as_environment env(getVM(*func)); env.set_target(target);
+ func->call(fn_call(target, env));
}
#ifdef GNASH_USE_GC
@@ -249,16 +242,16 @@
///
virtual void markReachableResources() const
{
- if ( func ) func->setReachable();
- if ( target ) target->setReachable();
+ if (func) func->setReachable();
+ if (target) target->setReachable();
}
#endif // GNASU_USE_GC
private:
- boost::intrusive_ptr<as_function> func;
+ as_function* func;
- boost::intrusive_ptr<DisplayObject> target;
+ DisplayObject* target;
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11590: Remove use of boost::intrusive_ptr with DisplayObjects in function returns.,
Benjamin Wolsey <=