Fix build error on GCC 4.8

by avoiding the copy constructor of std::ifstream
This commit is contained in:
Matthias Hochsteger 2018-01-25 11:29:24 +01:00
parent 93840787b3
commit c48084fd1c

View File

@ -119,7 +119,7 @@ void Ng_LoadMeshFromStream ( istream & input )
void Ng_LoadMesh (const char * filename) void Ng_LoadMesh (const char * filename)
{ {
{ {
auto infile = ifstream (filename); ifstream infile(filename);
if(!infile.good()) if(!infile.good())
throw NgException(string("Error opening file ") + filename); throw NgException(string("Error opening file ") + filename);
} }