mirror of https://github.com/axmolengine/axmol.git
Fixes wrong usage of std::vector's constructor in EventDispatcher::removeAllEventListener.
This commit is contained in:
parent
9c4f3ffa8d
commit
f3e6e8331a
|
@ -1484,7 +1484,8 @@ void EventDispatcher::removeCustomEventListeners(const std::string& customEventN
|
||||||
void EventDispatcher::removeAllEventListeners()
|
void EventDispatcher::removeAllEventListeners()
|
||||||
{
|
{
|
||||||
bool cleanMap = true;
|
bool cleanMap = true;
|
||||||
std::vector<EventListener::ListenerID> types(_listenerMap.size());
|
std::vector<EventListener::ListenerID> types;
|
||||||
|
types.reserve(_listenerMap.size());
|
||||||
|
|
||||||
for (const auto& e : _listenerMap)
|
for (const auto& e : _listenerMap)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue