From acf7d1cc6ec5393aa920da943b6b943628b9fc06 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 27 Mar 2021 22:57:05 +0100 Subject: [PATCH] Fixes unused variable in scriptdictionary.cpp --- .../angelscript_addons/scriptdictionary/scriptdictionary.cpp | 4 ++-- .../TypeRegistry/Battling/RegisterPokemonClass.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extern/angelscript_addons/scriptdictionary/scriptdictionary.cpp b/extern/angelscript_addons/scriptdictionary/scriptdictionary.cpp index 2ae5305..23a49eb 100644 --- a/extern/angelscript_addons/scriptdictionary/scriptdictionary.cpp +++ b/extern/angelscript_addons/scriptdictionary/scriptdictionary.cpp @@ -1068,7 +1068,7 @@ void RegisterScriptDictionary(asIScriptEngine *engine) void RegisterScriptDictionary_Native(asIScriptEngine *engine) { - int r; + [[maybe_unused]] int r; // The array type must be available assert( engine->GetTypeInfoByDecl("array") ); @@ -1147,7 +1147,7 @@ void RegisterScriptDictionary_Native(asIScriptEngine *engine) void RegisterScriptDictionary_Generic(asIScriptEngine *engine) { - int r; + [[maybe_unused]] int r; // Register the cleanup callback for the object type cache engine->SetEngineUserDataCleanupCallback(SDictionaryCache::Cleanup, DICTIONARY_CACHE); diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp index 1f2052b..f4bd6f5 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp @@ -92,7 +92,7 @@ OPTIONAL_BORROWED_PTR_GETTER_FUNC(PkmnLib::Battling::Pokemon, CreatureLib::Battl static CScriptHandle AddVolatileWrapper(PkmnLib::Battling::Pokemon* obj, const ArbUt::StringView& name) { auto handle = CScriptHandle(); - auto *resolver = static_cast(obj->GetLibrary()->GetScriptResolver().get()); + auto* resolver = static_cast(obj->GetLibrary()->GetScriptResolver().get()); auto script = static_cast(obj->AddVolatileScript(name))->GetRawAngelscriptObject(); script->AddRef(); handle.Set(script, resolver->GetBaseType("PkmnScript"));