Petite correction nklandcapesEval.h

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1887 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
verel 2010-07-09 14:58:17 +00:00
commit 2e02a15d01

View file

@ -79,7 +79,8 @@ public:
*/ */
nkLandscapesEval(const char * _fileName) nkLandscapesEval(const char * _fileName)
{ {
load(_fileName); string fname(_fileName);
load(fname);
}; };
/** /**
@ -131,10 +132,10 @@ public:
* *
* @param _fileName file name of the instance * @param _fileName file name of the instance
*/ */
virtual void load(const char * _fileName) virtual void load(const string _fileName)
{ {
fstream file; fstream file;
file.open(_fileName, ios::in); file.open(_fileName.c_str(), ios::in);
if (file.is_open()) { if (file.is_open()) {
string s; string s;
@ -249,7 +250,8 @@ public:
} }
file.close(); file.close();
} else { } else {
string str = "nkLandscapesEval.save: Could not open file [" + _fileName + "]." ; string fname(_fileName);
string str = "nkLandscapesEval.save: Could not open file [" + fname + "]." ;
throw runtime_error(str); throw runtime_error(str);
} }
}; };