This is faster, as only the inner list resizes, and this avoids calls to std::vector::operator[]
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8531
e03df62e-2008-0410-955e-
edbf42e46eb7
*/
typedef std::vector<Module*> IntModuleList;
-/** A list of event handlers
- */
-typedef std::vector<IntModuleList> EventHandlerList;
-
/** An event handler iterator
*/
typedef IntModuleList::iterator EventHandlerIter;
/** Event handler hooks.
* This needs to be public to be used by FOREACH_MOD and friends.
*/
- EventHandlerList EventHandlers;
+ IntModuleList EventHandlers[I_END];
/** Simple, bog-standard, boring constructor.
*/
ModuleManager::ModuleManager(InspIRCd* Ins) : ModCount(0), Instance(Ins)
{
- for (int n = I_BEGIN; n != I_END; ++n)
- EventHandlers.push_back(std::vector<Module*>());
}
ModuleManager::~ModuleManager()