diff options
| Commit | 00bea258e12e4481c50c2e275243e9dfeaeee9ca (patch) | |
|---|---|---|
| Author | 2022-05-30 20:38:28 +0300 | |
| Committer | 2022-05-30 20:38:28 +0300 | |
| Files | c82aa80d3320722c93f5d20619e32213e0217102 /src | |
| FMI-OOP-P2_Tables-00bea258e12e4481c50c2e275243e9dfeaeee9ca.tar FMI-OOP-P2_Tables-00bea258e12e4481c50c2e275243e9dfeaeee9ca.tar.gz FMI-OOP-P2_Tables-00bea258e12e4481c50c2e275243e9dfeaeee9ca.zip | ||
| Parent | dd8ff49d2bd29f08c5a6afa39d89dba3d715ee4a (diff) | |
Autocommit at 30.05.2022 @ 20:38
2 files changed, 3 insertions, 3 deletions
| -rw-r--r-- | src/Models/CellFormula.cpp | 4 | ||||
| -rw-r--r-- | src/main.cpp | 2 |
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp index de5202d..95fc3eb 100644 --- a/src/Models/CellFormula.cpp +++ b/src/Models/CellFormula.cpp @@ -94,7 +94,7 @@ void CellFormula::parseAndSetValue(const char* str) { currOp = *str; localCells.add(CellDouble(val)); - loc = {-1, localCells.get_count() - 1}; + loc = {-1, (int)(localCells.get_count() - 1)}; } if (currOp == '^') currOp *= -1; @@ -106,7 +106,7 @@ void CellFormula::parseAndSetValue(const char* str) { if (currOp == '-') { formula.add({loc, '+'}); localCells.add(CellDouble(-1.0)); - formula.add({{-1, localCells.get_count() - 1}, '*' * -1}); + formula.add({{-1, (int)(localCells.get_count() - 1)}, '*' * -1}); } else formula.add({loc, currOp}); } diff --git a/src/main.cpp b/src/main.cpp index 64b09c2..0f47890 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,6 +7,6 @@ int main() { table.putCell(0, 2, "\"String"); table.putCell(0, 3, "\"= 3 * R0C1 + R0C0 ^ R0C1 * 27 / R0C1 - 2 * 2.5 * 2 * 2 + R0C2 ^ R0C2 + R9999C999999"); // table.putCell(0, 3, "= 1 + 2 * 3 + 4 + 5"); - UserInterface ui(nullptr); + UserInterface ui(&table); ui.run(); } |
