]> OCCT Git - occt-copy.git/commitdiff
0026457: Failed build with OCCT_DEBUG enabled
authorabv <abv@opencascade.com>
Fri, 17 Jul 2015 16:20:06 +0000 (19:20 +0300)
committerabv <abv@opencascade.com>
Fri, 17 Jul 2015 16:20:06 +0000 (19:20 +0300)
Debug code enabled with OCCT_DEBUG macro corrected for compiling with new handles.

QANCollection_Handle.cxx simplified so as to avoid need of using /bigobj option when building by Visual Studio; templates of project files, CMake projects, and test perf fclasses handle corrected accordingly.

Script genproj corrected to recognize VTK and to build DRAWEXE as executable (rather than DLL).

15 files changed:
adm/genproj.tcl
adm/templates/template.vc10
adm/templates/template.vc11
adm/templates/template.vc12
adm/templates/template.vc9
src/DNaming/DNaming_RevolutionDriver.cxx
src/DNaming/DNaming_SelectionDriver.cxx
src/QANCollection/QANCollection_Handle.cxx
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPConstruct/STEPConstruct_ValidationProps.cxx
src/TKQADraw/CMakeLists.txt
src/TNaming/TNaming.cxx
src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx
src/UnitsAPI/UnitsAPI.cxx
tests/perf/fclasses/handle

index 0adf812093c2723be4ca355b7144cb54776b5572..06e187d124111e58f684269ec3bb2b622cb7e0ad 100644 (file)
@@ -1066,6 +1066,9 @@ proc osutils:csfList { theOS  theCsfMap } {
     # Note: Tcl library name depends on version and is chosen by #pragma
     set aCsfMap(CSF_QT)         "QtCore4.lib QtGui4.lib"
 
+    #-- VTK
+    set aCsfMap(CSF_VTK)         [osutils:vtkCsf "wnt"]
+
   } else {
 
     #-- Tcl/Tk configuration
@@ -1108,10 +1111,42 @@ proc osutils:csfList { theOS  theCsfMap } {
     set aCsfMap(CSF_GL2PS)          "gl2ps"
 
     #-- VTK
-    set aCsfMap(CSF_VTK)         "vtkCommonCore-6.1 vtkCommonDataModel-6.1 vtkCommonExecutionModel-6.1 vtkCommonMath-6.1 vtkCommonTransforms-6.1 vtkRenderingCore-6.1"
+    set aCsfMap(CSF_VTK)         [osutils:vtkCsf "unix"]
   }
 }
 
+# Returns string of library dependencies for generation of Visual Studio project or make lists.
+proc osutils:vtkCsf {{theOS ""}} {
+  set aVtkVer "6.1"
+
+  set aLibSuffix ""
+  set aPathSplitter ":"
+  
+  if {"$theOS" == "wnt"} {
+    set aPathSplitter ";"
+    set aLibSuffix ".lib"
+  }
+
+  set anOptIncs [split $::env(CSF_OPT_INC) "$aPathSplitter"]
+  foreach anIncItem $anOptIncs {
+    if {[regexp -- "vtk-(.*)$" [file tail $anIncItem] dummy aFoundVtkVer]} {
+      set aVtkVer $aFoundVtkVer
+    }
+  }
+
+  set aLibArray [list vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonTransforms vtkRenderingCore \
+                      vtkRenderingOpenGL  vtkFiltersGeneral vtkIOCore vtkIOImage vtkImagingCore vtkInteractionStyle]
+
+  # Additional suffices for the libraries
+  set anIdx 0
+  foreach anItem $aLibArray {
+    lset aLibArray $anIdx $anItem-$aVtkVer$aLibSuffix
+    incr anIdx
+  }
+
+  return [join $aLibArray " "]
+}
+
 proc osutils:usedOsLibs { theToolKit theOS } {
   global path
   set aUsedLibs [list]
@@ -1603,13 +1638,6 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
     }
 
     set aUsedToolKits [concat $aCommonUsedTK [osutils:usedOsLibs $theToolKit "wnt"]]
-       #puts "\t 7 $WOKSteps_exec_link($theToolKit)"
-    if { [regexp {WOKStep_DLLink} [_get_options wnt WOKSteps_exec_link $theToolKit]] || [regexp {WOKStep_Libink} [_get_options wnt WOKSteps_exec_link $theToolKit]] } {
-      set aUsedToolKits [concat $aUsedToolKits "\/dll"]
-      set binext 2
-    } else {
-      set binext 1
-    }
 
     # correct names of referred third-party libraries that are named with suffix
     # depending on VC version
@@ -1647,12 +1675,9 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
     regsub -all -- {__TKINC__}  $aProjTmpl $anIncPaths    aProjTmpl
     regsub -all -- {__TKDEFS__} $aProjTmpl $aTKDefines    aProjTmpl
     regsub -all -- {__FILES__}  $aProjTmpl $aFilesSection aProjTmpl
-    regsub -all -- {__CONF__}   $aProjTmpl $binext        aProjTmpl
-    if { $binext == 2 } {
-      regsub -all -- {__XQTEXT__} $aProjTmpl "dll" aProjTmpl
-    } else {
-      regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl
-    }
+    regsub -all -- {__CONF__}   $aProjTmpl Application    aProjTmpl
+
+    regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl
 
     set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w]
     fconfigure $aFile -translation crlf
index 61b3790a5cbb282ecfe2a96189f8caa81b1f0f4a..ee763aea747b58b3f6a06f25bbfc0bda66964034 100644 (file)
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>MaxSpeed</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
index 876dadeb4cd13b1184285679505f7eee7d8cfe94..5c09f22d7278824b91e6c1beec6302c7ae7394c6 100644 (file)
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>MaxSpeed</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
index 7cbdfeda49954c73e700e7f378d7cc5478a1833d..6e180d990afd95f79d81c80def4bd23e8050fb72 100644 (file)
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>MaxSpeed</Optimization>
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <AdditionalIncludeDirectories>__TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <Optimization>Disabled</Optimization>
index 69cbaaf9b3a95ddbbf9443eb81d826c5d4f4bee6..9bd735828981784a6ba675c0a84b2c8a757d1a43 100644 (file)
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions="-MP /bigobj"
+                               AdditionalOptions="-MP"
                                AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
                                Optimization="0"
                                InlineFunctionExpansion="1"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions="-MP -favor:blend /bigobj"
+                               AdditionalOptions="-MP -favor:blend"
                                AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
                                Optimization="2"
                                InlineFunctionExpansion="1"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions="-MP -favor:blend /bigobj"
+                               AdditionalOptions="-MP -favor:blend"
                                AdditionalIncludeDirectories="__TKINC__;$(CSF_OPT_INC)"
                                Optimization="0"
                                InlineFunctionExpansion="1"
index b8d0509532b166432f8a41642c9175b0d6d4873d..ca86865cb81169452d1c2198bd8740b4f60022d1 100644 (file)
@@ -418,7 +418,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
          else {
            if(MS.HasDegenerated())
              cout <<"mkRevol has degenerated" <<endl;
-           cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape() <<endl;
+           cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape().get() <<endl;
          }
 #endif
        }
@@ -435,7 +435,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
          else {
            if(MS.HasDegenerated())
              cout <<"mkRevol has degenerated" <<endl;
-           cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape() <<endl;
+           cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape().get() <<endl;
          }
 #endif
        }
@@ -504,7 +504,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
          else {
            if(MS.HasDegenerated())
              cout <<"mkRevol has degenerated" <<endl;
-           cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape() <<endl;
+           cout << "BRep_Tool found degenerated edge (from Vfirst) TS = " << it.Value().TShape().get() <<endl;
          }
 #endif
        }
@@ -520,7 +520,7 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
          else {
            if(MS.HasDegenerated())
              cout <<"mkRevol has degenerated" <<endl;
-           cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape() <<endl;
+           cout << "BRep_Tool found degenerated edge (from Vlast) TS = " << it.Value().TShape().get() <<endl;
          }
 #endif
        }
index 0b79579c1bb497cdb3a8f19452dd80106e445bce..ad1e152874d531c17761277ba21f9cc7521c7dda 100644 (file)
@@ -142,8 +142,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(TFunction_Logbook& theLog) con
        } else {
 #ifdef OCCT_DEBUG
          Write(aNS->Get(), "Selection_Result.brep");
-         Handle(TopoDS_TShape) aTS = aNS->Get().TShape();
-         cout << "TShape = " << (Standard_Address)aTS <<endl;
+         cout << "TShape = " << aNS->Get().TShape().get() <<endl;
 #endif 
          if(aIsWire && aNS->Get().ShapeType()== TopAbs_COMPOUND) {
            TopoDS_Shape aWireShape;
index c38466893ec2a1f05c90aeb0476baa9f99035e07..06671fde337e0c34d170463353e601eba7578319 100644 (file)
@@ -478,16 +478,8 @@ namespace
   {
     #define QA_TEST_CAST10(theTens, theDoCast) \
       QACast<QA_HANDLE_NAME(theTens ## 0)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 1)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 2)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 3)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 4)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 5)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 6)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 7)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 8)>::theDoCast(theDI, theNbIters, aPtr); \
-      QACast<QA_HANDLE_NAME(theTens ## 9)>::theDoCast(theDI, theNbIters, aPtr);
-
+      QACast<QA_HANDLE_NAME(theTens ## 5)>::theDoCast(theDI, theNbIters, aPtr);
     typedef typename TAs::element_type aPtrType;
     TAs aDummy (new aPtrType());
     theDI << "Making a pointer:\n";
@@ -582,26 +574,9 @@ static Standard_Integer QAHandleCast (Draw_Interpretor& theDI,
   std::ios::fmtflags aFlags = std::cout.flags();
   std::cout.precision (5);
 
-  #define QA_TEST_CASTAS10(theTens) \
-    case 10 * theTens + 0: qaCastAs<QA_HANDLE_NAME(theTens ## 0)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 1: qaCastAs<QA_HANDLE_NAME(theTens ## 1)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 2: qaCastAs<QA_HANDLE_NAME(theTens ## 2)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 3: qaCastAs<QA_HANDLE_NAME(theTens ## 3)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 4: qaCastAs<QA_HANDLE_NAME(theTens ## 4)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 5: qaCastAs<QA_HANDLE_NAME(theTens ## 5)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 6: qaCastAs<QA_HANDLE_NAME(theTens ## 6)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 7: qaCastAs<QA_HANDLE_NAME(theTens ## 7)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 8: qaCastAs<QA_HANDLE_NAME(theTens ## 8)>(theDI, *aHandle, aNbIters); break; \
-    case 10 * theTens + 9: qaCastAs<QA_HANDLE_NAME(theTens ## 9)>(theDI, *aHandle, aNbIters); break;
-
   switch (aPtrTo)
   {
     // vc11 requires /bigobj option
-    //QA_TEST_CASTAS10(0)
-    //QA_TEST_CASTAS10(1)
-    //QA_TEST_CASTAS10(2)
-    //QA_TEST_CASTAS10(3)
-    //QA_TEST_CASTAS10(4)
     case 0:  qaCastAs<Handle(qaclass00_50)>(theDI, *aHandle, aNbIters); break;
     case 10: qaCastAs<Handle(qaclass10_50)>(theDI, *aHandle, aNbIters); break;
     case 20: qaCastAs<Handle(qaclass20_50)>(theDI, *aHandle, aNbIters); break;
index d3ab997d39d418e941724bd83c75a7e3ef84d3d5..31a8e504520bc7259fdbc2f54202a8bca3b3a8cb 100644 (file)
@@ -184,7 +184,7 @@ TCollection_AsciiString AddrToString(const TopoDS_Shape& theShape)
 {
   std::string anAddrStr;
   std::ostringstream ost;
-  ost << theShape.TShape().Access();
+  ost << theShape.TShape().get();
   anAddrStr = ost.str();
 
   TCollection_AsciiString aStr =
index 6bd3aabd32ac4c8a531511ab691380b25fce694c..6df3c0ab4e631f24d7c68e68b35d066cc79ec505 100644 (file)
@@ -673,7 +673,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropReal (const Handle(StepRe
   else if ( Name == "VOLUME_MEASURE" ) isArea = Standard_False; 
   else {
 #ifdef OCCT_DEBUG
-    cout << "Warning: Measure " << Model()->StringLabel ( M ) << " is neither area not volume" << endl;
+    cout << "Warning: Measure " << Model()->StringLabel ( M )->String() << " is neither area not volume" << endl;
 #endif
     return Standard_False;
   }
@@ -696,7 +696,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropPnt (const Handle(StepRep
   Handle(StepGeom_CartesianPoint) P = Handle(StepGeom_CartesianPoint)::DownCast ( item );
   if ( P.IsNull() || P->NbCoordinates() != 3 ) {
 #ifdef OCCT_DEBUG
-    cout << "Warning: Point " << Model()->StringLabel ( P ) << " is not valid for centroid" << endl;
+    cout << "Warning: Point " << Model()->StringLabel ( P )->String() << " is not valid for centroid" << endl;
 #endif
     return Standard_False;;
   }
index 78c03b026888f0bef5a9524119dc0e2b21957100..175f79a12bfe95bb7c210666fc4ef13ee4be616e 100644 (file)
@@ -21,11 +21,4 @@ else()
   endif()
 endif()
 
-if(MSVC)
-  # /bigobj is required for windows builds because of the size of
-  # some object files (CastImage for instance)
-  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
-  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj")
-endif()
-
 include(${OCCT_SOURCE_DIR}/adm/cmake/BuildToolkit.cmake)
index 24691de33a6f78af27842dfc949ddccb9da2c403..dfea6cb71d3b14bf63f161cbcd827a208d9a53fa 100644 (file)
@@ -831,8 +831,8 @@ TopoDS_Shape TNaming::FindUniqueContext(const TopoDS_Shape& Selection, const Top
 #ifdef OCCT_DEBUG
   TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape it (aMap);
   for (;it.More();it.Next()) {
-    cout <<"FindUniqueContext: Key - " <<it.Key().ShapeType()<< " " << it.Key().TShape() <<" OR = " <<it.Key().Orientation() <<
-      "  Context - " << it.Value().ShapeType() << "  " << it.Value().TShape()  << " OR = " <<it.Value().Orientation() <<endl;
+    cout <<"FindUniqueContext: Key - " <<it.Key().ShapeType()<< " " << it.Key().TShape().get() <<" OR = " <<it.Key().Orientation() <<
+      "  Context - " << it.Value().ShapeType() << "  " << it.Value().TShape().get()  << " OR = " <<it.Value().Orientation() <<endl;
   }
 #endif
   if(aMap.IsBound(Selection))
index 3cbc391605f613c1c779163cea85ddae84ab650a..9a63230fb431ee90b47035ec82633e603196a149 100644 (file)
@@ -271,7 +271,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
       if (MkWire.IsDone()) Loop = Handle(StepShape_Loop)::DownCast(MkWire.Value());
       else {
 #ifdef OCCT_DEBUG
-       cout << TopoDSToStep::DecodeWireError(MkWire.Error()) << endl;
+       cout << TopoDSToStep::DecodeWireError(MkWire.Error())->String() << endl;
 #endif
        FP->AddWarning(errShape, " a Wire not mapped");
        continue;
index a106d7ba0f515fbdc6b15cbf9114efc457578b9b..aa3c37ca2eeca60b7abd3080faa17d4095f75eda 100644 (file)
@@ -359,7 +359,7 @@ Standard_Real UnitsAPI::AnyToLS(const Standard_Real aData,
   }
 #ifdef OCCT_DEBUG
   else
-    cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << "," << aDim << ")" << endl;
+    cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << "," << aDim.get() << ")" << endl;
 #endif
   return aValue;
 }
index 8cf2bda53a38ca47f29334f8b12bd0f5a75f549b..9c24bbc8073adbe499a2be7deb1bbd63135e1bba 100644 (file)
@@ -23,31 +23,26 @@ if { $ratio > 1.05 } {
 }
 
 # Check performance of down casting at different nesting depths.
-# OCCT is expected to be at least twice faster on deep nesting on x64,
-# however can be slower on 32-bit
+# OCCT is expected to be the same as C++
 set depths {3 5 10 50}
-if { [regexp x86 [dversion]] } {
-  set thresholds {2. 1.5 1. 1.2}
-} else {
-  set thresholds {1.6 1.1 0.7 0.5}
-}
+set threshold_std 1.15
+set threshold_ptr 1.05
 for {set i 0} {$i < [llength $depths]} {incr i} {
   set depth [lindex $depths $i]
-  set threshold [lindex $thresholds $i]
   puts "\nTesting DownCast at nesting depth $depth"
 
   set res [QAHandleCast $depth 0 100000]
   set res_lines [split $res \n]
-  set time_occt [lindex [lindex [split [lindex $res_lines end-2] :] end] $depth]
-  set time_std  [lindex [lindex [split [lindex $res_lines end-1] :] end] $depth]
-  set time_ptr  [lindex [lindex [split [lindex $res_lines end  ] :] end] $depth]
+  set time_occt [lindex [lindex [split [lindex $res_lines end-2] :] end] end]
+  set time_std  [lindex [lindex [split [lindex $res_lines end-1] :] end] end]
+  set time_ptr  [lindex [lindex [split [lindex $res_lines end  ] :] end] end]
   set ratio_std [expr $time_occt / $time_std]
   set ratio_ptr [expr $time_occt / $time_ptr]
   
   puts "Ratio of time of OCCT DownCast() to dynamic_cast<>: $ratio_std"
   puts "Ratio of time of OCCT DownCast() to dynamic_pointer_cast<>: $ratio_ptr"
 
-  if { $ratio_std > $threshold || $ratio_ptr > $threshold } {
+  if { $ratio_std > $threshold_std || $ratio_ptr > $threshold_ptr } {
     puts "Error: OCCT DownCast() is expected to be faster!"
   }
 }
\ No newline at end of file