From 26549197ce7552d249fb961d68f452578324ab77 Mon Sep 17 00:00:00 2001 From: seba Date: Thu, 13 Aug 2009 21:32:52 +0200 Subject: [PATCH] Fixed cleanup func pos (segfaults...) --- gameoflife.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gameoflife.cpp b/gameoflife.cpp index a5e6edc..2ff2a0d 100644 --- a/gameoflife.cpp +++ b/gameoflife.cpp @@ -296,15 +296,13 @@ bool GameOfLife::load(std::string file) { std::ifstream data(file.c_str()); if(!data) return false; - + cleanup(); std::string tmp; data >> x; data >> y; data >> torus; if(x<=0 || y <=0) return false; - - cleanup(); allocate(); int j=0; getline(data, tmp); // Remove \n @@ -314,7 +312,6 @@ bool GameOfLife::load(std::string file) { } j++; } - return true; } @@ -521,7 +518,6 @@ float GameOfLife::getBuildSec() { } void GameOfLife::setTickSec(float s) { - std::cout << "Set to " << s << std::endl; secpertick = s; }