mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -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:
@@ -52,7 +52,7 @@ ScriptRegexP regex_from_script(const ScriptValueP& value) {
|
||||
ScriptRegexP regex = dynamic_pointer_cast<ScriptRegex>(value);
|
||||
if (!regex) {
|
||||
// TODO: introduce some kind of caching?
|
||||
regex = make_intrusive<ScriptRegex>(*value);
|
||||
regex = make_intrusive<ScriptRegex>(value->toString());
|
||||
}
|
||||
return regex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user