mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Added 'assert' pseudo function so I can run some tests of the script code
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@988 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -201,7 +201,14 @@ void Context::setVariable(const String& name, const ScriptValueP& value) {
|
||||
setVariable(string_to_variable(name), value);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
extern vector<String> variable_names;
|
||||
#endif
|
||||
|
||||
void Context::setVariable(Variable name, const ScriptValueP& value) {
|
||||
#ifdef _DEBUG
|
||||
assert((size_t)name < variable_names.size());
|
||||
#endif
|
||||
VariableValue& var = variables[name];
|
||||
if (var.level < level) {
|
||||
// keep shadow copy
|
||||
|
||||
Reference in New Issue
Block a user