Work on performance improvements
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -10,12 +10,11 @@ class NumericEvalValue : public EvalValue{
|
||||
virtual long GetIntegerValue() = 0;
|
||||
virtual double GetFloatValue() = 0;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<ScriptType> _type;
|
||||
public:
|
||||
virtual const bool IsFloat() = 0;
|
||||
std::shared_ptr<ScriptType> GetType() override {
|
||||
return _type;
|
||||
|
||||
const TypeClass GetTypeClass() final{
|
||||
return TypeClass ::Number;
|
||||
}
|
||||
|
||||
NumericEvalValue* operator +(NumericEvalValue* b);
|
||||
@@ -35,7 +34,6 @@ class IntegerEvalValue : public NumericEvalValue{
|
||||
double GetFloatValue() final{ throw EvaluationException("Attempting to retrieve float from int eval value."); }
|
||||
public:
|
||||
explicit IntegerEvalValue(long value){
|
||||
_type = std::make_shared<NumericScriptType>(true, false);
|
||||
_value = value;
|
||||
}
|
||||
const bool IsFloat() final{
|
||||
@@ -61,7 +59,6 @@ class FloatEvalValue : public NumericEvalValue{
|
||||
double GetFloatValue() final{return _value;}
|
||||
public:
|
||||
explicit FloatEvalValue(double value){
|
||||
_type = std::make_shared<NumericScriptType>(true, true);
|
||||
_value = value;
|
||||
}
|
||||
const bool IsFloat() final{
|
||||
|
||||
Reference in New Issue
Block a user