diff options
Autocommit at 14.06.2022 @ 08:58
2 files changed, 3 insertions, 3 deletions
| -rw-r--r-- | src/Models/CellDouble.cpp | 4 | ||||
| -rw-r--r-- | src/Models/Table.cpp | 2 |
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<String> Table::getAllCells() const { List<String> 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 <<cells[i][j]->getValueForPrint() << std::endl; toRet.add(cells[i][j]->getValueForPrint()); } } |
