Browse Source

std::fstream accepts filename as std::string in C++11.

Finally.
pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
2c97326d8d
  1. 2
      src/Plugins/TgaImporter/TgaImporter.cpp
  2. 2
      src/Shader.cpp

2
src/Plugins/TgaImporter/TgaImporter.cpp

@ -59,7 +59,7 @@ void TgaImporter::doOpenData(const Containers::ArrayReference<const unsigned cha
}
void TgaImporter::doOpenFile(const std::string& filename) {
in = new std::ifstream(filename.c_str());
in = new std::ifstream(filename);
if(in->good()) return;
Error() << "Trade::TgaImporter::openFile(): cannot open file" << filename;

2
src/Shader.cpp

@ -605,7 +605,7 @@ Shader& Shader::addSource(std::string source) {
Shader& Shader::addFile(const std::string& filename) {
/* Open file */
std::ifstream file(filename.c_str());
std::ifstream file(filename);
CORRADE_ASSERT(file.good(), "Shader file " << '\'' + filename + '\'' << " cannot be opened.", *this);
/* Get size of shader and initialize buffer */

Loading…
Cancel
Save