More std::ifstream -> sg_ifstream
This commit is contained in:
parent
7f3fe584e3
commit
fc3d47cd34
2 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue