summaryrefslogtreecommitdiff
path: root/src/Model/Grid.cpp
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2015-05-01 15:50:10 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2015-05-01 15:50:10 +0200
commit683d7946798634c35df165bf40a97d78f947751c (patch)
tree6dd80b60ed63ec92d7b6e7f291079493f64f219b /src/Model/Grid.cpp
parent048f1e17b752d2af53db82c1861002283fc300fa (diff)
Add template support to Cell class
Diffstat (limited to 'src/Model/Grid.cpp')
-rw-r--r--src/Model/Grid.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Model/Grid.cpp b/src/Model/Grid.cpp
index cc9cdb1..103b95f 100644
--- a/src/Model/Grid.cpp
+++ b/src/Model/Grid.cpp
@@ -5,15 +5,15 @@ Grid::Grid(int size)
{
//Create Vector
m_size = size;
- m_table = std::vector<std::vector<Cell*> >(size);
+ m_table = std::vector<std::vector<Cell<StringElement>*> >(size);
//Init all of line and cell
for(int i = 0 ; i < size ; i++)
{
- m_table[i] = std::vector<Cell*>(size);
+ m_table[i] = std::vector<Cell<StringElement>*>(size);
for (int j = 0 ; j < size ; j++)
{
- Cell * cell = new Cell();
+ Cell<StringElement> * cell = new Cell<StringElement>("");
m_table[i][j] = cell;
}
}
@@ -72,7 +72,7 @@ bool Grid::gridIsFull()
return isFull;
}
-void Grid::setCell(int i, int j, Cell *cell)
+void Grid::setCell(int i, int j, Cell<StringElement> *cell)
{
if (i >= 0 && i < m_size && j >= 0 && j < m_size)
{