mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 23:51:54 +00:00
Test FixedVector{2,3}D script conversions, and test calling functions of the prototypes.
Also ENSURE that the given value identifier is actually present in the cache instead of creating one if it is not. This was SVN commit r17603.
This commit is contained in:
1 parent
4c4beb8450
commit
b18cd3254c
4 files changed
+109
-8
No files matched your search
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
/* Copyright (C) 2016 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -449,7 +449,9 @@ ScriptInterface::CxPrivate* ScriptInterface::GetScriptInterfaceAndCBData(JSConte
|
||||
|
||||
JS::Value ScriptInterface::GetCachedValue(CACHED_VAL valueIdentifier)
|
||||
{
|
||||
return m->m_ScriptValCache[valueIdentifier].get();
|
||||
std::map<ScriptInterface::CACHED_VAL, DefPersistentRooted<JS::Value>>::iterator it = m->m_ScriptValCache.find(valueIdentifier);
|
||||
ENSURE(it != m->m_ScriptValCache.end());
|
||||
return it->second.get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user