diff --git a/src/Battling/Library/MiscLibrary.hpp b/src/Battling/Library/MiscLibrary.hpp index eea75cc..d914083 100644 --- a/src/Battling/Library/MiscLibrary.hpp +++ b/src/Battling/Library/MiscLibrary.hpp @@ -2,6 +2,7 @@ #define PKMNLIB_MISCLIBRARY_HPP #include +#include #include "../../Library/Evolutions/EvolutionData.hpp" #include "../../Library/Moves/MoveData.hpp" #include "../Pokemon/LearnedMove.hpp" diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/HelperFile.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/HelperFile.hpp index 1d12dea..9d5101d 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/HelperFile.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/HelperFile.hpp @@ -87,7 +87,7 @@ void RegisterGetter(asIScriptEngine* engine, const char* asType, const char* asD } #define REGISTER_GETTER(asType, asDef, cType, cFunc) \ - RegisterGetter::type, &cType::cFunc>(engine, asType, asDef); + RegisterGetter().cFunc()), &cType::cFunc>(engine, asType, asDef); #define REGISTER_EXPLICIT_GETTER(asType, asDef, cType, cFunc, returnType) \ RegisterGetter(engine, asType, asDef); diff --git a/src/ScriptResolving/WASM/InterfaceMethods/Library/WASMSpeciesRegistry.cpp b/src/ScriptResolving/WASM/InterfaceMethods/Library/WASMSpeciesRegistry.cpp index 547abff..2160251 100644 --- a/src/ScriptResolving/WASM/InterfaceMethods/Library/WASMSpeciesRegistry.cpp +++ b/src/ScriptResolving/WASM/InterfaceMethods/Library/WASMSpeciesRegistry.cpp @@ -19,10 +19,7 @@ wasm_func_t* Species_GetFormeByHash(WebAssemblyScriptResolver* resolver) { resolver, {[](WebAssemblyScriptResolver*, const CreatureSpecies* species, u32 variant) -> const SpeciesVariant* { auto opt = species->TryGetVariant(variant); - if (opt.has_value()) { - return opt.value(); - } - return nullptr; + return opt.has_value() ? opt.value() : nullptr; }}); } diff --git a/src/ScriptResolving/WASM/InterfaceMethods/WASMHelperFile.hpp b/src/ScriptResolving/WASM/InterfaceMethods/WASMHelperFile.hpp index 95af186..87f93e2 100644 --- a/src/ScriptResolving/WASM/InterfaceMethods/WASMHelperFile.hpp +++ b/src/ScriptResolving/WASM/InterfaceMethods/WASMHelperFile.hpp @@ -211,8 +211,6 @@ private: #define REGISTER_GETTER(name, cType, cFunc, resolver) \ externs.Insert( \ - name, \ - WasmHelpers::RegisterGetter::type, &cType::cFunc>( \ - resolver)); + name, WasmHelpers::RegisterGetter().cFunc()), &cType::cFunc>(resolver)); #endif // PKMNLIB_HELPERFILE_H