Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models
diff options
context:
space:
mode:
Commite0d7dfad8fc32a9879eeafc0dda27266445ca283 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-28 17:54:16 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-28 17:54:16 +0300
Files6339bba35c6e3f7ed3377aba786f3bad4a46b129 /src/Models
FMI-OOP-P2_Tables-e0d7dfad8fc32a9879eeafc0dda27266445ca283.tar
FMI-OOP-P2_Tables-e0d7dfad8fc32a9879eeafc0dda27266445ca283.tar.gz
FMI-OOP-P2_Tables-e0d7dfad8fc32a9879eeafc0dda27266445ca283.zip
Parentb0ab37392de9cc11a20206a8e7e388237013697e (diff)
Autocommit at 28.05.2022 @ 17:54
2 files changed, 3 insertions, 5 deletions
-rw-r--r--src/Models/Table.cpp4
-rw-r--r--src/Models/Table.h4
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);