[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10513: Drop unneeded includes.
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10513: Drop unneeded includes. |
Date: |
Wed, 07 Jan 2009 08:53:42 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10513
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2009-01-07 08:53:42 +0100
message:
Drop unneeded includes.
modified:
libcore/as_environment.cpp
libcore/as_environment.h
libcore/swf/PlaceObject2Tag.cpp
libcore/swf/tag_loaders.cpp
libcore/swf_function.cpp
libcore/swf_function.h
------------------------------------------------------------
revno: 10491.1.1
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Tue 2008-12-30 16:18:25 +0100
message:
Header cleanup.
modified:
libcore/as_environment.cpp
libcore/as_environment.h
libcore/swf/tag_loaders.cpp
libcore/swf_function.h
------------------------------------------------------------
revno: 10491.1.2
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Tue 2008-12-30 16:21:27 +0100
message:
Line breaks.
modified:
libcore/swf/PlaceObject2Tag.cpp
------------------------------------------------------------
revno: 10491.1.3
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Tue 2008-12-30 16:28:13 +0100
message:
Minor cleanups.
modified:
libcore/swf_function.cpp
=== modified file 'libcore/as_environment.cpp'
--- a/libcore/as_environment.cpp 2008-12-03 08:54:10 +0000
+++ b/libcore/as_environment.cpp 2008-12-30 15:18:25 +0000
@@ -22,7 +22,6 @@
#include "MovieClip.h"
#include "shape_character_def.h"
#include "as_value.h"
-#include "with_stack_entry.h"
#include "VM.h"
#include "log.h"
#include "Property.h"
=== modified file 'libcore/as_environment.h'
--- a/libcore/as_environment.h 2008-12-18 11:25:16 +0000
+++ b/libcore/as_environment.h 2008-12-30 15:18:25 +0000
@@ -43,7 +43,6 @@
public:
/// A stack of objects used for variables/members lookup
- //typedef std::vector<with_stack_entry> ScopeStack;
typedef std::vector< boost::intrusive_ptr<as_object> > ScopeStack;
/// The variables container (case-insensitive)
=== modified file 'libcore/swf/PlaceObject2Tag.cpp'
--- a/libcore/swf/PlaceObject2Tag.cpp 2009-01-05 09:32:03 +0000
+++ b/libcore/swf/PlaceObject2Tag.cpp 2009-01-07 07:53:42 +0000
@@ -161,7 +161,7 @@
// Read the actions for event(s)
// auto_ptr here prevents leaks on malformed swf
- std::auto_ptr<action_buffer> action ( new
action_buffer(_movie_def) );
+ std::auto_ptr<action_buffer> action(new action_buffer(_movie_def));
action->read(in, in.tell()+event_length);
_actionBuffers.push_back(action.release()); // take ownership
@@ -197,13 +197,15 @@
event_id::CONSTRUCT
};
- // Let's see if the event flag we received is for an event that we
know of
+ // Let's see if the event flag we received is for an event
+ // that we know of.
// Integrity check: all reserved bits should be zero
if( flags >> total_known_events )
{
IF_VERBOSE_MALFORMED_SWF(
- log_swferror(_("swf_event::read() -- unknown / unhandled event
type received, flags = 0x%x"), flags);
+ log_swferror(_("swf_event::read() -- unknown / unhandled "
+ "event type received, flags = 0x%x"), flags);
);
}
@@ -212,11 +214,14 @@
{
if (flags & mask)
{
- /// Yes, swf_event stores a reference to an element in
_actionBuffers.
- /// A case of remote ownership, but both swf_event and the
actions
- /// are owned by this class, so shouldn't be a problem.
+ // Yes, swf_event stores a reference to an element in
+ // _actionBuffers. A case of remote ownership, but both
+ // swf_event and the actions are owned by this class,
+ // so shouldn't be a problem.
action_buffer* thisAction = _actionBuffers.back();
- std::auto_ptr<swf_event> ev ( new
swf_event(s_code_bits[i], *thisAction) );
+ std::auto_ptr<swf_event> ev(
+ new swf_event(s_code_bits[i], *thisAction));
+
IF_VERBOSE_PARSE (
log_parse("---- actions for event %s", ev->event());
);
@@ -233,11 +238,12 @@
catch (ParserException& what)
{
IF_VERBOSE_MALFORMED_SWF(
- log_swferror(_("Unexpected end of tag while parsing PlaceObject
tag events"));
+ log_swferror(_("Unexpected end of tag while parsing PlaceObject "
+ "tag events"));
);
break;
}
- } //end of for(;;)
+ }
}
// read SWF::PLACEOBJECT2
=== modified file 'libcore/swf/tag_loaders.cpp'
--- a/libcore/swf/tag_loaders.cpp 2009-01-06 10:04:07 +0000
+++ b/libcore/swf/tag_loaders.cpp 2009-01-07 07:53:42 +0000
@@ -39,7 +39,6 @@
#include "sprite_definition.h"
#include "MovieClip.h"
#include "swf_function.h"
-#include "swf_event.h"
#include "as_function.h"
#include "SWFMovieDefinition.h"
#include "swf.h"
=== modified file 'libcore/swf_function.cpp'
--- a/libcore/swf_function.cpp 2008-12-27 19:56:32 +0000
+++ b/libcore/swf_function.cpp 2008-12-30 15:28:13 +0000
@@ -37,15 +37,13 @@
{
#ifndef GNASH_USE_GC
if ( _properties ) _properties->drop_ref();
-#endif //ndef GNASH_USE_GC
+#endif
}
-swf_function::swf_function(const action_buffer* ab,
- as_environment* env,
+swf_function::swf_function(const action_buffer* ab, as_environment* env,
size_t start, const ScopeStack& scopeStack)
:
as_function(new as_object(getObjectInterface())),
- //ctor(0),
m_action_buffer(ab),
m_env(env),
_scopeStack(scopeStack),
@@ -58,12 +56,14 @@
assert(m_action_buffer);
assert( m_start_pc < m_action_buffer->size() );
- init_member("constructor",
as_value(as_function::getFunctionConstructor().get()));
+ init_member("constructor",
+ as_value(as_function::getFunctionConstructor().get()));
}
/*private static*/
Array_as*
-swf_function::getArguments(swf_function& callee, const fn_call& fn, as_object*
caller)
+swf_function::getArguments(swf_function& callee, const fn_call& fn,
+ as_object* caller)
{
#ifndef GNASH_USE_GC
// We'll be storing the callee as_object into an as_value
@@ -98,21 +98,22 @@
as_environment& env;
character* from;
character* from_orig;
+
// @param ch : target to set temporarely
// @param och : original target to set temporarely
TargetGuard(as_environment& e, character* ch, character* och)
:
- env(e)
+ env(e),
+ from(env.get_target()),
+ from_orig(env.get_original_target())
{
- from = env.get_target();
- from_orig = env.get_original_target();
- //log_debug("TargetGuard set target of env %p from %s to %s",
&e, from ? from->getTarget() : "<null>", ch ? ch->getTarget() : "<null>");
env.set_target(ch);
env.set_original_target(och);
}
+
+
~TargetGuard()
{
- //log_debug("TargetGuard reset target of env %p to %s", &env,
from ? from->getTarget() : "<null>");
env.set_target(from);
env.set_original_target(from_orig);
}
@@ -370,7 +371,6 @@
// in case of problems (most interesting action limits)
try
{
- //ActionExec exec(*m_action_buffer, *our_env, m_start_pc,
m_length, fn.result, m_with_stack, m_is_function2);
ActionExec exec(*this, *our_env, &result, fn.this_ptr.get());
exec();
}
@@ -381,7 +381,8 @@
}
catch (std::exception& ex) // unexpected but we can tell what it is
{
- log_debug("Unexpected exception from swf_function execution:
%s", ex.what());
+ log_debug("Unexpected exception from swf_function execution:
%s",
+ ex.what());
throw;
}
catch (...) // unexpected, unknown, but why not cleaning up...
@@ -407,7 +408,8 @@
swf_function::markReachableResources() const
{
// Mark scope stack objects
- for (ScopeStack::const_iterator i=_scopeStack.begin(),
e=_scopeStack.end(); i!=e; ++i)
+ for (ScopeStack::const_iterator i = _scopeStack.begin(),
+ e = _scopeStack.end(); i != e; ++i)
{
(*i)->setReachable();
}
=== modified file 'libcore/swf_function.h'
--- a/libcore/swf_function.h 2008-09-17 13:12:23 +0000
+++ b/libcore/swf_function.h 2008-12-30 15:18:25 +0000
@@ -26,7 +26,6 @@
#include "as_function.h" // for inheritance
#include "as_object.h" // for composition (vector element)
#include "VM.h" //fow SWF version
-//#include "with_stack_entry.h" // for composition (vector element)
#include <boost/algorithm/string/case_conv.hpp>
#include <cassert>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10513: Drop unneeded includes.,
Benjamin Wolsey <=