]> git.mxchange.org Git - flightgear.git/commitdiff
More std::ifstream -> sg_ifstream
authorJames Turner <zakalawe@mac.com>
Sun, 3 Jul 2016 22:48:44 +0000 (23:48 +0100)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 Sep 2016 21:27:47 +0000 (23:27 +0200)
src/Main/fg_commands.cxx
src/Scripting/NasalSys.cxx

index 77132cc9985506c89ac4d695c0a2b045f5c308cd..ac013383441cd7a5830161130a1e641be964fd20 100644 (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);
index 2d3d56868a0d0dfb239b7c4e1641f478eb5f6308..20b97849c356d932f888bd5297cf536397a011c7 100644 (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);