Work on performance improvements
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-13 16:26:10 +02:00
parent e93bcab14d
commit 1cb65f17c9
19 changed files with 84 additions and 108 deletions

View File

@@ -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{