mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/calculation] Correct assignement operator
Change-Id: I1ef13c064b9151b8d0b1b53fb6c40c6f2ba2304b
This commit is contained in:
@@ -15,11 +15,15 @@ Calculation & Calculation::operator= (const Calculation & other) {
|
||||
if (m_expression != nullptr) {
|
||||
delete m_expression;
|
||||
}
|
||||
m_expression = Expression::parse(m_text);
|
||||
m_expression = nullptr;
|
||||
if (other.m_expression) {
|
||||
m_expression = Expression::parse(m_text);
|
||||
}
|
||||
if (m_layout != nullptr) {
|
||||
delete m_layout;
|
||||
}
|
||||
if (m_expression) {
|
||||
m_layout = nullptr;
|
||||
if (m_expression && other.m_layout) {
|
||||
m_layout = m_expression->createLayout();
|
||||
}
|
||||
m_evaluation = other.m_evaluation;
|
||||
|
||||
Reference in New Issue
Block a user