Allocation failure fix and test

This commit is contained in:
Léa Saviot
2018-06-28 14:50:45 +02:00
parent c208da2f90
commit 46d56ade21
17 changed files with 151 additions and 28 deletions

View File

@@ -14,6 +14,7 @@ public:
return m_value > 1 ? "BigFloat" : "SmallFloat";
}
void setFloat(float f) { m_value = f; }
void init(float f) override { m_value = f; }
private:
float m_value;
};
@@ -21,7 +22,7 @@ private:
class FloatRef : public ExpressionReference<FloatNode> {
public:
FloatRef(float f) : ExpressionReference<FloatNode>() {
this->node()->setFloat(f);
this->uncastedNode()->init(f);
}
};