From Martin Naylor, replace osgDB::fstream with an osgDB::open() call.

This commit is contained in:
Robert Osfield
2013-06-12 12:49:18 +00:00
parent 1a7f2fcb3e
commit b4bfc3a451
4 changed files with 12 additions and 23 deletions

View File

@@ -12,6 +12,8 @@
*/
#include <osgDB/fstream>
#include <osgDB/ConvertUTF>
#include <osg/Config>
@@ -25,17 +27,13 @@ namespace osgDB
#define OSGDB_CONVERT_UTF8_FILENAME(s) s
#endif
fstream::fstream(){}
fstream::fstream(const char* filename,
std::ios_base::openmode mode) : std::fstream(OSGDB_CONVERT_UTF8_FILENAME(filename), mode)
{}
fstream::~fstream(){}
void fstream::open(const char* filename,
std::ios_base::openmode mode)
void open(std::fstream &fs, const char* filename,std::ios_base::openmode mode)
{
std::fstream::open(OSGDB_CONVERT_UTF8_FILENAME(filename), mode);
fs.open(OSGDB_CONVERT_UTF8_FILENAME(filename), mode);
}
ifstream::ifstream(){}
ifstream::ifstream(const char* filename,
std::ios_base::openmode mode) : std::ifstream(OSGDB_CONVERT_UTF8_FILENAME(filename), mode)