Forráskód Böngészése

change map_lanetoxodr. fix cdaproc.

yuchuli 2 éve
szülő
commit
b300206792

+ 2 - 2
src/common/common/xodr/OpenDrive/OpenDriveXmlWriter.cpp

@@ -2174,9 +2174,9 @@ bool OpenDriveXmlWriter::WriteFile(std::string fileName)
 	}
 
 	// Saves the XML structure to the file
-	doc.SaveFile( fileName ); 
+    return doc.SaveFile( fileName );
 
-	return true;
+//	return true;
 
 }
 //--------------

+ 6 - 1
src/tool/map_lanetoxodr/cdamain.cpp

@@ -160,7 +160,12 @@ int main(int argc, char *argv[])
         snprintf(strout,1000,"Convert OK. out file path: %s ",gstr_outputpath);
         ivstdcolorout(strout,iv::STDCOLOR_BOLDGREEN);
         OpenDriveXmlWriter x(&xxodr);
-        x.WriteFile(gstr_outputpath);
+        bool bWrite = x.WriteFile(gstr_outputpath);
+        if(bWrite == false)
+        {
+            snprintf(strout,1000,"Save File Fail. Please check write privilege.");
+            ivstdcolorout(strout,iv::STDCOLOR_BOLDRED);
+        }
     }
     else
     {