0024072: VC 2009 64-bit compiler crashes while compiling IntPoly_ShapeSection.cxx
authorRoman Lygin <roman.lygin@gmail.com>
Tue, 16 Jul 2013 17:33:29 +0000 (21:33 +0400)
committerRoman Lygin <roman.lygin@gmail.com>
Thu, 18 Jul 2013 09:12:49 +0000 (13:12 +0400)
src/IntPoly/IntPoly_ShapeSection.cxx
src/TCollection/TCollection_Array1.cdl
src/TCollection/TCollection_Array1.gxx
src/TCollection/TCollection_Array1.lxx
src/TCollection/TCollection_Array2.cdl
src/TCollection/TCollection_Array2.gxx
src/TCollection/TCollection_Array2.lxx

index 39b968c..ea0b13f 100755 (executable)
@@ -375,7 +375,7 @@ void IntPoly_ShapeSection::Explore()
        const gp_Pnt& A1 = TA1.Value(i);
        const gp_Pnt& A2 = TA2.Value(i);
        const gp_Pnt& A3 = TA3.Value(i);
-       gp_Vec OA1(A1.XYZ());
+       gp_Vec OA1(A1.X(), A1.Y(), A1.Z());
        gp_Vec VA0 = gp_Vec(A1,A2);
        gp_Vec VA  = gp_Vec(A1,A3);
        VA0.Cross(VA);
index bf15014..7739b88 100755 (executable)
@@ -85,7 +85,6 @@ is
        
     Init (me: in out; V: Array1Item);
        ---Purpose: Initializes the array with a given value.
-        ---C++: inline
 
     Destroy (me: in out);
        ---Purpose: Frees the  allocated   area  corresponding  to the
index a1dfdde..974a53c 100755 (executable)
 #include <Standard_DimensionMismatch.hxx>
 
 
+//=======================================================================
+//function : Init
+//purpose  : 
+//=======================================================================
+
+void TCollection_Array1::Init (const Array1Item& V) {
+  Array1Item* p = &ChangeValue(myLowerBound);
+  const Standard_Integer n = Length();
+  for(Standard_Integer i = 0; i < n; i++) {
+    p[i] = V;
+  }
+}
+
 //=======================================================================
 //function : Assign
 //purpose  : 
index 5e43c5a..cdbd629 100755 (executable)
@@ -17,7 +17,6 @@
 // and conditions governing the rights and limitations under the License.
 
 #include <Standard.hxx>
-#include <Standard_OutOfMemory.hxx>
 #include <Standard_OutOfRange.hxx>
 #include <Standard_RangeError.hxx>
 
@@ -39,7 +38,6 @@ inline TCollection_Array1::TCollection_Array1 (const Standard_Integer Low,
 
   Array1Item* p = new Array1Item[Up-Low+1];
 
-  if (!p) Standard_OutOfMemory::Raise("Array1 : Allocation failed");
   myStart = (void*)(p - myLowerBound);
 }
 
@@ -59,19 +57,6 @@ inline TCollection_Array1::TCollection_Array1(const Array1Item& AnItem,
   myStart = (void*)( &AnItem - Low ); 
 }
 
-//=======================================================================
-//function : Init
-//purpose  : 
-//=======================================================================
-
-inline void TCollection_Array1::Init (const Array1Item& V) {
-  Array1Item* p = &ChangeValue(myLowerBound);
-  const Standard_Integer n = Length();
-  for(Standard_Integer i = 0; i < n; i++) {
-    p[i] = V;
-  }
-}
-
 //=======================================================================
 //function : Destroy
 //purpose  : 
index 4a3fe6c..0352287 100755 (executable)
@@ -50,13 +50,11 @@ is
     raises 
        RangeError  from Standard,
        OutOfMemory from Standard;
-        ---C++: inline
 
     Create (AnArray : Array2) 
     returns Array2 from TCollection
        ---Purpose: creates an Array2 by copy of an Array2.
     raises OutOfMemory from Standard is private ;
-        ---C++: inline
 
     Create (Item : Array2Item; R1, R2, C1, C2: Integer from Standard) 
     returns  Array2 from TCollection
@@ -75,11 +73,9 @@ is
     raises
        RangeError  from Standard,
        OutOfMemory from Standard;
-        ---C++: inline
        
     Init(me : in out; V : Array2Item);
        ---Purpose: Initializes this array with the value <Value>.
-        ---C++: inline
 
     Destroy (me : in out );
         ---Level: Advanced
@@ -88,7 +84,6 @@ is
        --          DoubleArray the Destroy doesn't delete the area.
         --          
         ---C++: alias ~
-        ---C++: inline
 
     Assign (me: in out; Other: Array2) 
     returns Array2 from TCollection
index 0593913..e6de9ab 100755 (executable)
@@ -59,6 +59,73 @@ void TCollection_Array2::Allocate ()
   myData = (void*) (q - myLowerRow);
 }
 
+//=======================================================================
+//function : TCollection_Array2
+//purpose  : 
+//=======================================================================
+
+TCollection_Array2::TCollection_Array2 (const Standard_Integer R1, 
+                                        const Standard_Integer R2,
+                                        const Standard_Integer C1, 
+                                        const Standard_Integer C2) :
+       myLowerRow(R1),
+       myLowerColumn(C1),
+       myUpperRow(R2),
+       myUpperColumn(C2),
+       myDeletable(Standard_True)
+{
+  Allocate ();
+}
+
+//=======================================================================
+//function : TCollection_Array2
+//purpose  : User allocated data
+//=======================================================================
+
+TCollection_Array2::TCollection_Array2 (const Array2Item& Item,
+                                       const Standard_Integer R1, 
+                                       const Standard_Integer R2,
+                                       const Standard_Integer C1, 
+                                       const Standard_Integer C2) :
+       myLowerRow(R1),
+       myLowerColumn(C1),
+       myUpperRow(R2),
+       myUpperColumn(C2),
+       myDeletable(Standard_False),
+       myData((void*)&Item)
+{
+  Allocate ();
+}
+
+//=======================================================================
+//function : Init
+//purpose  : 
+//=======================================================================
+
+void TCollection_Array2::Init (const Array2Item& V) 
+{
+  Standard_Integer Size = RowLength() * ColLength();
+  Array2Item* p = &(ChangeValue(myLowerRow,myLowerColumn));
+  for (Standard_Integer I = 0; I < Size ; I++) p[I] = V;
+}
+
+//=======================================================================
+//function : Destroy
+//purpose  : 
+//=======================================================================
+
+void TCollection_Array2::Destroy () 
+{
+  Array2Item** anItemPtr = ((Array2Item**)myData + myLowerRow);
+  
+  // delete the data
+  //
+  if (myDeletable) 
+    delete [] &ChangeValue(myLowerRow,myLowerColumn);
+
+  // delete the indirection table
+  Standard::Free((void*&)anItemPtr);
+}
 
 //=======================================================================
 //function : Assign
index 405a271..7211c98 100755 (executable)
 
 #include Array2Item_hxx
 
-//=======================================================================
-//function : TCollection_Array2
-//purpose  : 
-//=======================================================================
-
-inline TCollection_Array2::TCollection_Array2 (const Standard_Integer R1, 
-                                               const Standard_Integer R2,
-                                               const Standard_Integer C1, 
-                                               const Standard_Integer C2) :
-       myLowerRow(R1),
-       myLowerColumn(C1),
-       myUpperRow(R2),
-       myUpperColumn(C2),
-       myDeletable(Standard_True)
-{
-  Allocate ();
-}
-
-//=======================================================================
-//function : TCollection_Array2
-//purpose  : User allocated data
-//=======================================================================
-
-inline TCollection_Array2::TCollection_Array2 (const Array2Item& Item,
-                                       const Standard_Integer R1, 
-                                       const Standard_Integer R2,
-                                       const Standard_Integer C1, 
-                                       const Standard_Integer C2) :
-       myLowerRow(R1),
-       myLowerColumn(C1),
-       myUpperRow(R2),
-       myUpperColumn(C2),
-       myDeletable(Standard_False),
-       myData((void*)&Item)
-{
-  Allocate ();
-}
-
-//=======================================================================
-//function : Init
-//purpose  : 
-//=======================================================================
-
-inline void TCollection_Array2::Init (const Array2Item& V) 
-{
-  Standard_Integer Size = RowLength() * ColLength();
-  Array2Item* p = &(ChangeValue(myLowerRow,myLowerColumn));
-  for (Standard_Integer I = 0; I < Size ; I++) p[I] = V;
-}
-
-//=======================================================================
-//function : Destroy
-//purpose  : 
-//=======================================================================
-
-inline void TCollection_Array2::Destroy () 
-{
-  Array2Item** anItemPtr = ((Array2Item**)myData + myLowerRow);
-  
-  // delete the data
-  //
-  if (myDeletable) 
-    delete [] &ChangeValue(myLowerRow,myLowerColumn);
-
-  // delete the indirection table
-  Standard::Free((void*&)anItemPtr);
-}
-
 //=======================================================================
 //function : ColLength
 //purpose  :