Rename ke::Lambda to ke::Function.
This commit is contained in:
parent
a253e175bb
commit
c2df49ee33
@ -67,7 +67,7 @@ struct DatabaseInfo;
|
|||||||
class IPlayerInfoBridge;
|
class IPlayerInfoBridge;
|
||||||
class ICommandArgs;
|
class ICommandArgs;
|
||||||
|
|
||||||
typedef ke::Lambda<bool(int client, const ICommandArgs*)> CommandFunc;
|
typedef ke::Function<bool(int client, const ICommandArgs*)> CommandFunc;
|
||||||
|
|
||||||
class CoreProvider
|
class CoreProvider
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ class CommandHook : public ke::Refcounted<CommandHook>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// return false to RETURN_META(MRES_IGNORED), or true to SUPERCEDE.
|
// return false to RETURN_META(MRES_IGNORED), or true to SUPERCEDE.
|
||||||
typedef ke::Lambda<bool(int, const ICommandArgs *)> Callback;
|
typedef ke::Function<bool(int, const ICommandArgs *)> Callback;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CommandHook(ConCommand *cmd, const Callback &callback, bool post);
|
CommandHook(ConCommand *cmd, const Callback &callback, bool post);
|
||||||
|
@ -117,7 +117,7 @@ struct QHandleType
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef ke::Lambda<void(const char *)> HandleReporter;
|
typedef ke::Function<void(const char *)> HandleReporter;
|
||||||
|
|
||||||
class HandleSystem :
|
class HandleSystem :
|
||||||
public IHandleSys
|
public IHandleSys
|
||||||
|
@ -1165,7 +1165,7 @@ bool CPlugin::ForEachExtVar(const ExtVarCallback& callback)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlugin::ForEachLibrary(ke::Lambda<void(const char *)> callback)
|
void CPlugin::ForEachLibrary(ke::Function<void(const char *)> callback)
|
||||||
{
|
{
|
||||||
for (auto iter = m_Libraries.begin(); iter != m_Libraries.end(); iter++)
|
for (auto iter = m_Libraries.begin(); iter != m_Libraries.end(); iter++)
|
||||||
callback((*iter).c_str());
|
callback((*iter).c_str());
|
||||||
@ -1177,7 +1177,7 @@ void CPlugin::AddRequiredLib(const char *name)
|
|||||||
m_RequiredLibs.push_back(name);
|
m_RequiredLibs.push_back(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPlugin::ForEachRequiredLib(ke::Lambda<bool(const char *)> callback)
|
bool CPlugin::ForEachRequiredLib(ke::Function<bool(const char *)> callback)
|
||||||
{
|
{
|
||||||
for (auto iter = m_RequiredLibs.begin(); iter != m_RequiredLibs.end(); iter++) {
|
for (auto iter = m_RequiredLibs.begin(); iter != m_RequiredLibs.end(); iter++) {
|
||||||
if (!callback((*iter).c_str()))
|
if (!callback((*iter).c_str()))
|
||||||
@ -2273,7 +2273,7 @@ void CPluginManager::FreePluginList(const CVector<SMPlugin *> *list)
|
|||||||
delete const_cast<CVector<SMPlugin *> *>(list);
|
delete const_cast<CVector<SMPlugin *> *>(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginManager::ForEachPlugin(ke::Lambda<void(CPlugin *)> callback)
|
void CPluginManager::ForEachPlugin(ke::Function<void(CPlugin *)> callback)
|
||||||
{
|
{
|
||||||
for (PluginIter iter(m_plugins); !iter.done(); iter.next())
|
for (PluginIter iter(m_plugins); !iter.done(); iter.next())
|
||||||
callback(*iter);
|
callback(*iter);
|
||||||
|
@ -129,10 +129,10 @@ public:
|
|||||||
bool required;
|
bool required;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef ke::Lambda<bool(const sp_pubvar_t *, const ExtVar& ext)> ExtVarCallback;
|
typedef ke::Function<bool(const sp_pubvar_t *, const ExtVar& ext)> ExtVarCallback;
|
||||||
bool ForEachExtVar(const ExtVarCallback& callback);
|
bool ForEachExtVar(const ExtVarCallback& callback);
|
||||||
|
|
||||||
void ForEachLibrary(ke::Lambda<void(const char *)> callback);
|
void ForEachLibrary(ke::Function<void(const char *)> callback);
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Creates a plugin object with default values.
|
* Creates a plugin object with default values.
|
||||||
@ -215,7 +215,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AddRequiredLib(const char *name);
|
void AddRequiredLib(const char *name);
|
||||||
bool ForEachRequiredLib(ke::Lambda<bool(const char *)> callback);
|
bool ForEachRequiredLib(ke::Function<bool(const char *)> callback);
|
||||||
|
|
||||||
bool HasMissingFakeNatives() const {
|
bool HasMissingFakeNatives() const {
|
||||||
return m_FakeNativesMissing;
|
return m_FakeNativesMissing;
|
||||||
@ -432,7 +432,7 @@ public:
|
|||||||
|
|
||||||
void _SetPauseState(CPlugin *pPlugin, bool pause);
|
void _SetPauseState(CPlugin *pPlugin, bool pause);
|
||||||
|
|
||||||
void ForEachPlugin(ke::Lambda<void(CPlugin *)> callback);
|
void ForEachPlugin(ke::Function<void(CPlugin *)> callback);
|
||||||
private:
|
private:
|
||||||
LoadRes LoadPlugin(CPlugin **pPlugin, const char *path, bool debug, PluginType type);
|
LoadRes LoadPlugin(CPlugin **pPlugin, const char *path, bool debug, PluginType type);
|
||||||
|
|
||||||
|
@ -29,11 +29,11 @@
|
|||||||
|
|
||||||
using namespace SourceMod;
|
using namespace SourceMod;
|
||||||
|
|
||||||
ke::Vector<ke::Lambda<void()>> sNextTasks;
|
ke::Vector<ke::Function<void()>> sNextTasks;
|
||||||
ke::Vector<ke::Lambda<void()>> sWorkTasks;
|
ke::Vector<ke::Function<void()>> sWorkTasks;
|
||||||
|
|
||||||
void
|
void
|
||||||
SourceMod::ScheduleTaskForNextFrame(ke::Lambda<void()>&& task)
|
SourceMod::ScheduleTaskForNextFrame(ke::Function<void()>&& task)
|
||||||
{
|
{
|
||||||
sNextTasks.append(ke::Forward<decltype(task)>(task));
|
sNextTasks.append(ke::Forward<decltype(task)>(task));
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ SourceMod::RunScheduledFrameTasks(bool simulating)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Swap.
|
// Swap.
|
||||||
ke::Vector<ke::Lambda<void()>> temp(ke::Move(sNextTasks));
|
ke::Vector<ke::Function<void()>> temp(ke::Move(sNextTasks));
|
||||||
sNextTasks = ke::Move(sWorkTasks);
|
sNextTasks = ke::Move(sWorkTasks);
|
||||||
sWorkTasks = ke::Move(temp);
|
sWorkTasks = ke::Move(temp);
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
namespace SourceMod {
|
namespace SourceMod {
|
||||||
|
|
||||||
void ScheduleTaskForNextFrame(ke::Lambda<void()>&& task);
|
void ScheduleTaskForNextFrame(ke::Function<void()>&& task);
|
||||||
|
|
||||||
void RunScheduledFrameTasks(bool simulating);
|
void RunScheduledFrameTasks(bool simulating);
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 83c4441b7ede45dfa447bdef614e924c4b7ffea9
|
Subproject commit 8a59372d1f8333ad455e03866b2aec7769cfb51a
|
@ -1 +1 @@
|
|||||||
Subproject commit 49f94603972956a85dab61da475e92795ead40a5
|
Subproject commit ee2b9baac39f1e3d1e4c81600beb6b4e1f81323e
|
Loading…
Reference in New Issue
Block a user