diff options
Autocommit at 28.05.2022 @ 17:54
2 files changed, 3 insertions, 5 deletions
| -rw-r--r-- | src/Models/Table.cpp | 4 | ||||
| -rw-r--r-- | src/Models/Table.h | 4 |
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index 6e367bc..232d066 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -1,7 +1,5 @@ #include "Table.h" Table::Table(unsigned rows, unsigned cols) { - cells = new Cell*[rows]; - for (unsigned i = 0; i < rows; i++) - cells[i] = new Cell[cols]; + cells = List<List<Cell*>>(rows); } diff --git a/src/Models/Table.h b/src/Models/Table.h index 5ed5dd9..9fea34a 100644 --- a/src/Models/Table.h +++ b/src/Models/Table.h @@ -5,8 +5,8 @@ #include "../Generic/List/List.hpp" class Table { - Cell** cells; - List<List<Cell>> constantsCells; + List<List<Cell*>> cells; + List<List<Cell*>> constantsCells; public: Table(unsigned rows, unsigned cols); |
