1
0
Fork 0

More std::ifstream -> sg_ifstream

This commit is contained in:
James Turner 2016-07-03 23:48:44 +01:00
parent 7f3fe584e3
commit fc3d47cd34
2 changed files with 4 additions and 2 deletions

View file

@ -14,6 +14,7 @@
#include <simgear/sg_inlines.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/math/sg_random.h>
#include <simgear/misc/sgstream.hxx>
#include <simgear/scene/material/mat.hxx>
#include <simgear/scene/material/matlib.hxx>
#include <simgear/structure/exception.hxx>
@ -295,7 +296,7 @@ do_load (const SGPropertyNode * arg)
return false;
}
ifstream input(validated_path.c_str());
sg_ifstream input(SGPath::fromUtf8(validated_path));
if (input.good() && fgLoadFlight(input)) {
input.close();
SG_LOG(SG_INPUT, SG_INFO, "Restored flight from " << file);

View file

@ -24,6 +24,7 @@
#include <simgear/props/props.hxx>
#include <simgear/math/sg_random.h>
#include <simgear/misc/sg_path.hxx>
#include <simgear/misc/sgstream.hxx>
#include <simgear/misc/sg_dir.hxx>
#include <simgear/misc/SimpleMarkdown.hxx>
#include <simgear/structure/commands.hxx>
@ -726,7 +727,7 @@ static naRef f_parsexml(naContext c, naRef me, int argc, naRef* args)
naRuntimeError(c, "parsexml(): access denied (unauthorized directory)");
return naNil();
}
std::ifstream input(file.c_str());
sg_ifstream input(SGPath::fromUtf8(file));
NasalXMLVisitor visitor(c, argc, args);
try {
readXML(input, visitor);