$on_mod required using geode namespace

This commit is contained in:
matcool 2023-05-19 13:58:24 -03:00
parent 0f1d81326a
commit 518b15e34a
No known key found for this signature in database
GPG key ID: BF58756086D7AB1C

View file

@ -58,15 +58,15 @@ namespace geode {
// clang-format off
#define $on_mod(type) \
template<class> \
void GEODE_CONCAT(geodeExecFunction, __LINE__)(ModStateEvent*); \
namespace { \
struct GEODE_CONCAT(ExecFuncUnique, __LINE__) {}; \
} \
static inline auto GEODE_CONCAT(Exec, __LINE__) = (new geode::EventListener( \
&GEODE_CONCAT(geodeExecFunction, __LINE__)<GEODE_CONCAT(ExecFuncUnique, __LINE__)>,\
geode::ModStateFilter(geode::getMod(), geode::ModEventType::type)\
), 0); \
template<class> \
void GEODE_CONCAT(geodeExecFunction, __LINE__)(ModStateEvent*)
template<class> \
void GEODE_CONCAT(geodeExecFunction, __LINE__)(geode::ModStateEvent*); \
namespace { \
struct GEODE_CONCAT(ExecFuncUnique, __LINE__) {}; \
} \
static inline auto GEODE_CONCAT(Exec, __LINE__) = (new geode::EventListener( \
&GEODE_CONCAT(geodeExecFunction, __LINE__)<GEODE_CONCAT(ExecFuncUnique, __LINE__)>, \
geode::ModStateFilter(geode::getMod(), geode::ModEventType::type) \
), 0); \
template<class> \
void GEODE_CONCAT(geodeExecFunction, __LINE__)(geode::ModStateEvent*)
// clang-format on