mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 03:29:58 +02:00
Remove Nodes' init method: assert node is not allocationFailure instead
This commit is contained in:
@@ -18,7 +18,6 @@ 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;
|
||||
};
|
||||
@@ -26,7 +25,9 @@ private:
|
||||
class FloatRef : public ExpressionReference<FloatNode> {
|
||||
public:
|
||||
FloatRef(float f) : ExpressionReference<FloatNode>() {
|
||||
this->node()->init(f);
|
||||
if (!(this->node()->isAllocationFailure())) {
|
||||
this->castedNode()->setFloat(f);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user