Commit 2fe19a9d authored by Yann Boucher's avatar Yann Boucher
Browse files

Passage par référence constante pour pushGrid

parent 83a5a7ba
Pipeline #77935 passed with stages
in 16 seconds
...@@ -35,7 +35,7 @@ public: ...@@ -35,7 +35,7 @@ public:
unsigned int get_nbMax()const{return nbMax;} unsigned int get_nbMax()const{return nbMax;}
void pushGrid(Grid g); void pushGrid(const Grid& g);
Grid popGrid(); Grid popGrid();
Grid topGrid() Grid topGrid()
{ {
......
...@@ -17,7 +17,7 @@ History::History(unsigned int nbM){ ...@@ -17,7 +17,7 @@ History::History(unsigned int nbM){
nbMax=nbM; nbMax=nbM;
} }
void History::pushGrid(Grid g){ void History::pushGrid(const Grid &g){
if(tab.size()==nbMax){ if(tab.size()==nbMax){
tab.pop_front(); tab.pop_front();
tab.push_back(g); tab.push_back(g);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment