mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Use toSomeType() instead of operator SomeType in ScriptValue.
This means that we are more explicit about type conversions. Also use override specifiers for overriden virtual functions in ScriptValue.
This commit is contained in:
@@ -37,12 +37,12 @@ inline size_t spelled_correctly(const String& input, size_t start, size_t end, S
|
||||
if (extra_test) {
|
||||
// try on untagged
|
||||
ctx.setVariable(SCRIPT_VAR_input, to_script(word));
|
||||
if (*extra_test->eval(ctx)) {
|
||||
if (extra_test->eval(ctx)->toBool()) {
|
||||
return true;
|
||||
}
|
||||
// try on tagged
|
||||
ctx.setVariable(SCRIPT_VAR_input, to_script(input.substr(start,end-start)));
|
||||
if (*extra_test->eval(ctx)) {
|
||||
if (extra_test->eval(ctx)->toBool()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user