]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/util.cxx
Merge branch 'curt/replay' into next
[flightgear.git] / src / Main / util.cxx
index 909cbad12657fb5f0daa46cc46792ad2e29dee52..0986e91ea47a71c93b9595c25affa837743abc22 100644 (file)
@@ -25,7 +25,7 @@
 #include <cstdlib>
 
 #include <vector>
-SG_USING_STD(vector);
+using std::vector;
 
 #include <simgear/debug/logstream.hxx>
 
@@ -198,12 +198,20 @@ fgUnescape (const char *s)
 }
 
 
+// Write out path to validation node and read it back in. A Nasal
+// listener is supposed to replace the path with a validated version
+// or an empty string otherwise.
 const char *fgValidatePath (const char *str, bool write)
 {
     static SGPropertyNode_ptr r, w;
     if (!r) {
         r = fgGetNode("/sim/paths/validate/read", true);
+        r->setAttribute(SGPropertyNode::READ, true);
+        r->setAttribute(SGPropertyNode::WRITE, true);
+
         w = fgGetNode("/sim/paths/validate/write", true);
+        w->setAttribute(SGPropertyNode::READ, true);
+        w->setAttribute(SGPropertyNode::WRITE, true);
     }
     SGPropertyNode *prop = write ? w : r;
     prop->setStringValue(str);