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:
@@ -163,11 +163,11 @@ void init_script_variables();
|
||||
* The script is itself a ScriptValue
|
||||
*/
|
||||
class Script : public ScriptValue {
|
||||
public:
|
||||
public:
|
||||
|
||||
virtual ScriptType type() const;
|
||||
virtual String typeName() const;
|
||||
virtual ScriptValueP dependencies(Context& ctx, const Dependency&) const;
|
||||
ScriptType type() const override;
|
||||
String typeName() const override;
|
||||
ScriptValueP dependencies(Context& ctx, const Dependency&) const override;
|
||||
|
||||
/// Add a jump instruction, later comeFrom should be called on the returned value
|
||||
unsigned int addInstruction(InstructionType t);
|
||||
@@ -196,10 +196,9 @@ class Script : public ScriptValue {
|
||||
/// Output an instruction in a human readable format
|
||||
String dumpInstr(unsigned int pos, Instruction i) const;
|
||||
|
||||
protected:
|
||||
virtual ScriptValueP do_eval(Context& ctx, bool openScope) const;
|
||||
ScriptValueP eval(Context& ctx, bool openScope = true) const override;
|
||||
|
||||
private:
|
||||
private:
|
||||
/// Data of the instructions that make up this script
|
||||
vector<Instruction> instructions;
|
||||
/// Constant values that can be referred to from the script
|
||||
|
||||
Reference in New Issue
Block a user