Fixes unused variable in scriptdictionary.cpp
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2021-03-27 22:57:05 +01:00
parent 057884b0a5
commit acf7d1cc6e
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 3 additions and 3 deletions

View File

@ -1068,7 +1068,7 @@ void RegisterScriptDictionary(asIScriptEngine *engine)
void RegisterScriptDictionary_Native(asIScriptEngine *engine) void RegisterScriptDictionary_Native(asIScriptEngine *engine)
{ {
int r; [[maybe_unused]] int r;
// The array<string> type must be available // The array<string> type must be available
assert( engine->GetTypeInfoByDecl("array<string>") ); assert( engine->GetTypeInfoByDecl("array<string>") );
@ -1147,7 +1147,7 @@ void RegisterScriptDictionary_Native(asIScriptEngine *engine)
void RegisterScriptDictionary_Generic(asIScriptEngine *engine) void RegisterScriptDictionary_Generic(asIScriptEngine *engine)
{ {
int r; [[maybe_unused]] int r;
// Register the cleanup callback for the object type cache // Register the cleanup callback for the object type cache
engine->SetEngineUserDataCleanupCallback(SDictionaryCache::Cleanup, DICTIONARY_CACHE); engine->SetEngineUserDataCleanupCallback(SDictionaryCache::Cleanup, DICTIONARY_CACHE);

View File

@ -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) { static CScriptHandle AddVolatileWrapper(PkmnLib::Battling::Pokemon* obj, const ArbUt::StringView& name) {
auto handle = CScriptHandle(); auto handle = CScriptHandle();
auto *resolver = static_cast<AngelScriptResolver*>(obj->GetLibrary()->GetScriptResolver().get()); auto* resolver = static_cast<AngelScriptResolver*>(obj->GetLibrary()->GetScriptResolver().get());
auto script = static_cast<AngelScriptScript*>(obj->AddVolatileScript(name))->GetRawAngelscriptObject(); auto script = static_cast<AngelScriptScript*>(obj->AddVolatileScript(name))->GetRawAngelscriptObject();
script->AddRef(); script->AddRef();
handle.Set(script, resolver->GetBaseType("PkmnScript")); handle.Set(script, resolver->GetBaseType("PkmnScript"));