fix warnings on clang

This commit is contained in:
HJfod 2022-09-28 16:21:05 +03:00
parent e2cb16d919
commit 51cb3ba85e
3 changed files with 8 additions and 6 deletions
loader/include/Geode

View file

@ -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)) {

View file

@ -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();

View file

@ -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 \"" +