diff --git a/loader/include/Geode/loader/Event.hpp b/loader/include/Geode/loader/Event.hpp index 4ee957ae..3362f15b 100644 --- a/loader/include/Geode/loader/Event.hpp +++ b/loader/include/Geode/loader/Event.hpp @@ -3,6 +3,7 @@ #include <Geode/DefaultInclude.hpp> #include <type_traits> #include "Mod.hpp" +#include "Interface.hpp" namespace geode { class Mod; @@ -20,7 +21,8 @@ namespace geode { friend BasicEventHandler; Mod* m_sender; - public: + + public: static std::vector<BasicEventHandler*> const& getHandlers(); void postFrom(Mod* sender); @@ -35,7 +37,7 @@ namespace geode { template <typename T> class EventHandler : public BasicEventHandler { - public: + public: virtual bool handle(T*) = 0; bool onEvent(Event* ev) override { if (auto myev = dynamic_cast<T*>(ev)) { diff --git a/loader/include/Geode/ui/InputNode.hpp b/loader/include/Geode/ui/InputNode.hpp index 666dde79..57898607 100644 --- a/loader/include/Geode/ui/InputNode.hpp +++ b/loader/include/Geode/ui/InputNode.hpp @@ -45,7 +45,7 @@ namespace geode { CCTextInputNode* getInput() const; cocos2d::extension::CCScale9Sprite* getBG() const; - void setEnabled(bool); + void setEnabled(bool enabled) override; void setString(std::string const&); const char* getString(); diff --git a/loader/include/Geode/utils/JsonValidation.hpp b/loader/include/Geode/utils/JsonValidation.hpp index b0b98944..327882b4 100644 --- a/loader/include/Geode/utils/JsonValidation.hpp +++ b/loader/include/Geode/utils/JsonValidation.hpp @@ -184,7 +184,7 @@ namespace geode { JsonMaybeValue<Json> validate(JsonValueValidator<T> validator) { if (this->isError()) return *this; try { - if (!validator(self().m_json.get<T>())) { + if (!validator(self().m_json.template get<T>())) { this->setError(self().m_hierarchy + ": Invalid value format"); } } catch(...) { @@ -219,7 +219,7 @@ namespace geode { this->inferType<A>(); if (this->isError()) return *this; try { - target = self().m_json.get<A>(); + target = self().m_json.template get<A>(); } catch(...) { this->setError( self().m_hierarchy + ": Invalid type \"" + @@ -234,7 +234,7 @@ namespace geode { this->inferType<T>(); if (this->isError()) return T(); try { - return self().m_json.get<T>(); + return self().m_json.template get<T>(); } catch(...) { this->setError( self().m_hierarchy + ": Invalid type to get \"" +