From 41b5f9891b2758193d8ec4d524f5f4b1dc27ec53 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 14 Jun 2022 08:58:53 +0300 Subject: Autocommit at 14.06.2022 @ 08:58 --- src/Models/CellDouble.cpp | 4 ++-- src/Models/Table.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Models') diff --git a/src/Models/CellDouble.cpp b/src/Models/CellDouble.cpp index 675791e..c1f90f7 100644 --- a/src/Models/CellDouble.cpp +++ b/src/Models/CellDouble.cpp @@ -9,11 +9,11 @@ CellDouble::CellDouble(double value) { CellDouble::CellDouble(const char* str) { std::cout << "Double: " << str << std::endl; value = 0; - bool negative = *str == '-'; + bool negative = (*str == '-'); if (*str == '-' || *str == '+') str++; while (*str != '.') - value = value * 10 + '0' - *(str++); + value = value * 10 + ('0' - *(str++)); str++; for (unsigned div = 10; *str != '\0'; div *= 10) value += (double)('0' - *(str++)) / div; diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index 0fb01b6..c8e2cb3 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -169,7 +169,7 @@ List Table::getAllCells() const { List toRet; for (unsigned i = 0; i < cells.get_count(); i++) { for (unsigned j = 0; j < cells[i].get_count(); j++) { - std::cout << i << ' ' << j << std::endl; + std::cout <getValueForPrint() << std::endl; toRet.add(cells[i][j]->getValueForPrint()); } } -- cgit v1.3.1-26-gb76a