From 0154b6953d8c26bb7fc9a9314d9bc02c022547a3 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 14 Jun 2022 07:53:36 +0300 Subject: Autocommit at 14.06.2022 @ 07:53 --- src/Models/CellDouble.cpp | 2 ++ src/Models/CellInt.cpp | 2 ++ src/Models/Table.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Models') diff --git a/src/Models/CellDouble.cpp b/src/Models/CellDouble.cpp index e19be3b..675791e 100644 --- a/src/Models/CellDouble.cpp +++ b/src/Models/CellDouble.cpp @@ -5,7 +5,9 @@ CellDouble::CellDouble(double value) { this->value = value; } +#include CellDouble::CellDouble(const char* str) { + std::cout << "Double: " << str << std::endl; value = 0; bool negative = *str == '-'; if (*str == '-' || *str == '+') str++; diff --git a/src/Models/CellInt.cpp b/src/Models/CellInt.cpp index a20c5ed..37283e4 100644 --- a/src/Models/CellInt.cpp +++ b/src/Models/CellInt.cpp @@ -5,7 +5,9 @@ CellInt::CellInt(int value) { this->value = value; } +#include CellInt::CellInt(const char* str) { + std::cout << "Int: " << str << std::endl; value = 0; bool negative = *str == '-'; if (*str == '-' || *str == '+') str++; diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index f1201f2..cfd8ee1 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -166,7 +166,7 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) { List Table::getAllCells() const { List toRet; for (unsigned i = 0; i < cells.get_count(); i++) { - for (unsigned j = 0; j < cells[i].get_length(); j++) { + for (unsigned j = 0; j < cells[i].get_count(); j++) { std::cout << i << ' ' << j << std::endl; toRet.add(cells[i][j]->getValueForPrint()); } -- cgit v1.3.1-26-gb76a