Require explicit inequality as well as equality operators on evalvalues
This commit is contained in:
@@ -60,6 +60,10 @@ namespace Porygon::UserData {
|
||||
return b->GetHashCode() == _hash;
|
||||
}
|
||||
|
||||
bool operator!=(const EvalValue *b) const override {
|
||||
return !operator==(b);
|
||||
}
|
||||
|
||||
[[nodiscard]] EvalValue* Clone() const final{
|
||||
return new UserDataCollectionValue(_type, _helper, _hash);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ namespace Porygon::UserData {
|
||||
return _obj == ((UserDataValue *) b)->_obj;
|
||||
}
|
||||
|
||||
bool operator!=(const EvalValue *b) const override {
|
||||
return !operator==(b);
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
inline Evaluation::EvalValue* Clone() const final {
|
||||
auto ud = _userData->Get();
|
||||
@@ -78,6 +82,7 @@ namespace Porygon::UserData {
|
||||
EvalValue* Cast(shared_ptr<const ScriptType> castType) const final{
|
||||
return _userData->Get()->Cast(_obj, castType.get());
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user