0030180: Data Exchange - VrmlAPI_Writer is expected to return export state
[occt.git] / src / XSDRAWSTLVRML / XSDRAWSTLVRML.cxx
index 5a0551d..cf86dc0 100644 (file)
@@ -532,7 +532,10 @@ static Standard_Integer writevrml
   case 2: writer.SetRepresentation(VrmlAPI_BothRepresentation); break;
   }
 
-  writer.Write(aShape, argv[2], aVersion);
+  if (!writer.Write(aShape, argv[2], aVersion))
+  {
+    di << "Error: File " << argv[2] << " was not written\n";
+  }
 
   return 0;
 }
@@ -551,10 +554,10 @@ static Standard_Integer loadvrml
     VrmlData_DataMapOfShapeAppearance aShapeAppMap;
 
     //-----------------------------------------------------------
-    filebuf aFic;
-    istream aStream (&aFic);
+    std::filebuf aFic;
+    std::istream aStream (&aFic);
 
-    if (aFic.open(argv[2], ios::in)) {
+    if (aFic.open(argv[2], std::ios::in)) {
 
       // Get path of the VRML file.
       OSD_Path aPath(argv[2]);