Add copy ctors to event filters

This commit is contained in:
altalk23 2023-04-10 16:54:58 +03:00
parent d0d0b79578
commit 4cec5d7eb0
6 changed files with 9 additions and 0 deletions

View file

@ -45,5 +45,6 @@ namespace geode {
} }
DispatchFilter(std::string const& id) : m_id(id) {} DispatchFilter(std::string const& id) : m_id(id) {}
DispatchFilter(DispatchFilter const&) = default;
}; };
} }

View file

@ -61,6 +61,7 @@ namespace geode {
std::string const& modID, std::string const& modID,
std::string const& messageID std::string const& messageID
); );
IPCFilter(IPCFilter const&) = default;
}; };
std::monostate listenForIPC(std::string const& messageID, json::Value(*callback)(IPCEvent*)); std::monostate listenForIPC(std::string const& messageID, json::Value(*callback)(IPCEvent*));

View file

@ -28,6 +28,7 @@ namespace geode {
ListenerResult handle(utils::MiniFunction<Callback> fn, ModInstallEvent* event); ListenerResult handle(utils::MiniFunction<Callback> fn, ModInstallEvent* event);
ModInstallFilter(std::string const& id); ModInstallFilter(std::string const& id);
ModInstallFilter(ModInstallFilter const&) = default;
}; };
struct GEODE_DLL IndexUpdateEvent : public Event { struct GEODE_DLL IndexUpdateEvent : public Event {
@ -41,6 +42,7 @@ namespace geode {
ListenerResult handle(utils::MiniFunction<Callback> fn, IndexUpdateEvent* event); ListenerResult handle(utils::MiniFunction<Callback> fn, IndexUpdateEvent* event);
IndexUpdateFilter(); IndexUpdateFilter();
IndexUpdateFilter(IndexUpdateFilter const&) = default;
}; };
struct IndexSourceImpl; struct IndexSourceImpl;

View file

@ -32,6 +32,7 @@ namespace geode {
std::string const& modID, std::string const& modID,
std::optional<std::string> const& settingKey std::optional<std::string> const& settingKey
); );
SettingChangedFilter(SettingChangedFilter const&) = default;
}; };
/** /**
@ -56,6 +57,7 @@ namespace geode {
std::string const& modID, std::string const& modID,
std::string const& settingID std::string const& settingID
) : SettingChangedFilter(modID, settingID) {} ) : SettingChangedFilter(modID, settingID) {}
GeodeSettingChangedFilter(GeodeSettingChangedFilter const&) = default;
}; };
template <class T> template <class T>

View file

@ -34,6 +34,7 @@ namespace geode {
AEnterLayerFilter( AEnterLayerFilter(
std::optional<std::string> const& id std::optional<std::string> const& id
); );
AEnterLayerFilter(AEnterLayerFilter const&) = default;
}; };
template<InheritsCCNode T> template<InheritsCCNode T>
@ -71,5 +72,6 @@ namespace geode {
EnterLayerFilter( EnterLayerFilter(
std::optional<std::string> const& id std::optional<std::string> const& id
) : m_targetID(id) {} ) : m_targetID(id) {}
EnterLayerFilter(EnterLayerFilter const&) = default;
}; };
} }

View file

@ -29,4 +29,5 @@ public:
ListenerResult handle(utils::MiniFunction<Callback> fn, TestEvent* event); ListenerResult handle(utils::MiniFunction<Callback> fn, TestEvent* event);
TestEventFilter(); TestEventFilter();
TestEventFilter(TestEventFilter const&) = default;
}; };