fix
This commit is contained in:
parent
444d5640c8
commit
2bbb816cbf
1 changed files with 4 additions and 2 deletions
|
|
@ -172,7 +172,8 @@ namespace Crafter {
|
|||
|
||||
for (auto& listenerSlice : this->listeners) {
|
||||
listenerSlice.second.erase(std::remove(listenerSlice.second.begin(), listenerSlice.second.end(), static_cast<EventListener<void>*>(nullptr)), listenerSlice.second.end());
|
||||
for (const auto& listener : listenerSlice.second) {
|
||||
auto sliceCopy = listenerSlice.second;
|
||||
for (const auto& listener : sliceCopy) {
|
||||
#ifdef CRAFTER_TIMING
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
#endif
|
||||
|
|
@ -201,7 +202,8 @@ namespace Crafter {
|
|||
|
||||
for (auto& listenerSlice : this->listeners) {
|
||||
listenerSlice.second.erase(std::remove(listenerSlice.second.begin(), listenerSlice.second.end(), static_cast<EventListener<T>*>(nullptr)), listenerSlice.second.end());
|
||||
for (const auto& listener : listenerSlice.second) {
|
||||
auto sliceCopy = listenerSlice.second;
|
||||
for (const auto& listener : sliceCopy) {
|
||||
#ifdef CRAFTER_TIMING
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue