From 00bea258e12e4481c50c2e275243e9dfeaeee9ca Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 30 May 2022 20:38:28 +0300 Subject: Autocommit at 30.05.2022 @ 20:38 --- src/Models/CellFormula.cpp | 4 ++-- src/main.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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(); } -- cgit v1.3.1-23-gd82d