mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Optimized calls to Event() (avoid allocating a new Event when it can be reused)
This commit is contained in:
parent
47a3c0bf55
commit
c5a46be23e
16 changed files with 195 additions and 146 deletions
|
@ -57,7 +57,7 @@ class ScriptCommandEvent : public Event
|
|||
{
|
||||
public:
|
||||
ScriptCommandEvent(unsigned int eventNum);
|
||||
ScriptCommandEvent(unsigned int eventNum, size_t numArgs);
|
||||
ScriptCommandEvent(unsigned int eventNum, int numArgs);
|
||||
};
|
||||
|
||||
ScriptCommandEvent::ScriptCommandEvent(unsigned int eventNum)
|
||||
|
@ -66,8 +66,8 @@ ScriptCommandEvent::ScriptCommandEvent(unsigned int eventNum)
|
|||
fromScript = true;
|
||||
}
|
||||
|
||||
ScriptCommandEvent::ScriptCommandEvent(unsigned int eventNum, size_t numArgs)
|
||||
: Event(eventNum)
|
||||
ScriptCommandEvent::ScriptCommandEvent(unsigned int eventNum, int numArgs)
|
||||
: Event(eventNum, numArgs)
|
||||
{
|
||||
fromScript = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue