]> OCCT Git - occt-wok.git/commitdiff
OCC20178 Conversion problems during VS2005 compilation
authorcascade <cascade@opencascade.com>
Thu, 31 Jul 2008 16:54:58 +0000 (16:54 +0000)
committercascade <cascade@opencascade.com>
Thu, 31 Jul 2008 16:54:58 +0000 (16:54 +0000)
src/WOKUtils/WOKUtils_Param.cxx

index 2709b456acd4f458189412bd2d60dd348afd9948..2d77a207fd0bb8bdb780a919426f5ddba0be8a00 100755 (executable)
@@ -431,22 +431,18 @@ Handle(TCollection_HAsciiString) WOKUtils_Param::ClassFile(const Standard_CStrin
 //=======================================================================
 Handle(TCollection_HAsciiString) WOKUtils_Param::ClassSubFile(const Standard_CString aclass, const Standard_CString asub) const
 {
-  Standard_PCharacter thedir = strchr(asub, '@');
+  Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString(asub);
+  Standard_CString thedir = strchr(asub, '@');
 
   if(thedir)
-    {
-      Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString(&(thedir[1]));
-      result->AssignCat("/");
-      *thedir = '\0';
-      result->AssignCat(asub);
-      *thedir = '@';
-      result->AssignCat("_");
-      result->AssignCat(aclass);
-      result->AssignCat(".edl");
-      return result;
-    }
+  {
+    Handle(TCollection_HAsciiString) res = new TCollection_HAsciiString(&(thedir[1]));
+    result->Trunc(thedir-asub);
+    res->AssignCat("/");
+    res->AssignCat(result);
+    result = res;
+  }
 
-  Handle(TCollection_HAsciiString) result = new TCollection_HAsciiString(asub);
   result->AssignCat("_");
   result->AssignCat(aclass);
   result->AssignCat(".edl");