added default constructor
This commit is contained in:
parent
dd3b2a4b9a
commit
7078bcf5ba
1 changed files with 4 additions and 3 deletions
|
|
@ -1,12 +1,11 @@
|
|||
/*
|
||||
Crafter®.Event
|
||||
Copyright (C) 2025 Catcrafts®
|
||||
Catcrafts.net
|
||||
catcrafts.net
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3.0 of the License, or (at your option) any later version.
|
||||
License version 3.0 as published by the Free Software Foundation;
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
@ -60,6 +59,7 @@ namespace Crafter {
|
|||
class Event {
|
||||
public:
|
||||
std::map<int, std::vector<EventListener<T>*>> listeners;
|
||||
Event() = default;
|
||||
Event(Event&& other) : listeners(std::move(other.listeners)) {
|
||||
for (const auto& listenerSlice : listeners) {
|
||||
for (const auto& listener : listenerSlice.second) {
|
||||
|
|
@ -128,6 +128,7 @@ namespace Crafter {
|
|||
class Event<void> {
|
||||
public:
|
||||
std::map<int, std::vector<EventListener<void>*>> listeners;
|
||||
Event() = default;
|
||||
Event(Event&& other) : listeners(std::move(other.listeners)) {
|
||||
for (const auto& listenerSlice : listeners) {
|
||||
for (const auto& listener : listenerSlice.second) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue