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:
Twan van Laarhoven
2020-04-26 17:03:43 +02:00
parent 42b7cf52b8
commit 2e897edbbf
22 changed files with 524 additions and 490 deletions
+9 -9
View File
@@ -190,14 +190,14 @@ class KeywordParamValue : public ScriptValue {
String separator_before, separator_after;
String value;
virtual ScriptType type() const;
virtual String typeName() const;
virtual operator String() const;
virtual operator int() const;
virtual operator bool() const;
virtual operator double() const;
virtual operator Color() const;
virtual int itemCount() const;
virtual ScriptValueP getMember(const String& name) const;
ScriptType type() const override;
String typeName() const override;
String toString() const override;
int toInt() const override;
bool toBool() const override;
double toDouble() const override;
Color toColor() const override;
int itemCount() const override;
ScriptValueP getMember(const String& name) const override;
};