re-added this back, it was a good idea after all

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40533
This commit is contained in:
David Anderson 2007-02-22 02:20:15 +00:00
parent 81a6bc3288
commit 8567d140d2
2 changed files with 16 additions and 7 deletions

View File

@ -278,11 +278,6 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
{
func = (*iter);
if (!func->IsRunnable())
{
continue;
}
for (unsigned int i=0; i<num_params; i++)
{
param = &temp_info[i];
@ -612,13 +607,21 @@ bool CForward::RemoveFunction(IPluginFunction *func)
{
bool found = false;
FuncIter iter;
List<IPluginFunction *> *lst;
if (func->IsRunnable())
{
lst = &m_functions;
} else {
lst = &m_paused;
}
for (iter=m_functions.begin(); iter!=m_functions.end(); iter++)
{
if ((*iter) == func)
{
found = true;
m_functions.erase(iter);
lst->erase(iter);
break;
}
}
@ -660,7 +663,12 @@ bool CForward::AddFunction(IPluginFunction *func)
return false;
}
m_functions.push_back(func);
if (func->IsRunnable())
{
m_functions.push_back(func);
} else {
m_paused.push_back(func);
}
return true;
}

View File

@ -83,6 +83,7 @@ protected:
* Destroying these things and using new/delete for their members feels bad.
*/
mutable List<IPluginFunction *> m_functions;
mutable List<IPluginFunction *> m_paused;
/* Type and name information */
FwdParamInfo m_params[SP_MAX_EXEC_PARAMS];