mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0024072: VC 2009 64-bit compiler crashes while compiling IntPoly_ShapeSection.cxx
This commit is contained in:
parent
35e08fe886
commit
efef9da8e5
@ -375,7 +375,7 @@ void IntPoly_ShapeSection::Explore()
|
|||||||
const gp_Pnt& A1 = TA1.Value(i);
|
const gp_Pnt& A1 = TA1.Value(i);
|
||||||
const gp_Pnt& A2 = TA2.Value(i);
|
const gp_Pnt& A2 = TA2.Value(i);
|
||||||
const gp_Pnt& A3 = TA3.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 VA0 = gp_Vec(A1,A2);
|
||||||
gp_Vec VA = gp_Vec(A1,A3);
|
gp_Vec VA = gp_Vec(A1,A3);
|
||||||
VA0.Cross(VA);
|
VA0.Cross(VA);
|
||||||
|
@ -85,7 +85,6 @@ is
|
|||||||
|
|
||||||
Init (me: in out; V: Array1Item);
|
Init (me: in out; V: Array1Item);
|
||||||
---Purpose: Initializes the array with a given value.
|
---Purpose: Initializes the array with a given value.
|
||||||
---C++: inline
|
|
||||||
|
|
||||||
Destroy (me: in out);
|
Destroy (me: in out);
|
||||||
---Purpose: Frees the allocated area corresponding to the
|
---Purpose: Frees the allocated area corresponding to the
|
||||||
|
@ -19,6 +19,19 @@
|
|||||||
#include <Standard_DimensionMismatch.hxx>
|
#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
|
//function : Assign
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
// and conditions governing the rights and limitations under the License.
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_OutOfMemory.hxx>
|
|
||||||
#include <Standard_OutOfRange.hxx>
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_RangeError.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];
|
Array1Item* p = new Array1Item[Up-Low+1];
|
||||||
|
|
||||||
if (!p) Standard_OutOfMemory::Raise("Array1 : Allocation failed");
|
|
||||||
myStart = (void*)(p - myLowerBound);
|
myStart = (void*)(p - myLowerBound);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,19 +57,6 @@ inline TCollection_Array1::TCollection_Array1(const Array1Item& AnItem,
|
|||||||
myStart = (void*)( &AnItem - Low );
|
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
|
//function : Destroy
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -50,13 +50,11 @@ is
|
|||||||
raises
|
raises
|
||||||
RangeError from Standard,
|
RangeError from Standard,
|
||||||
OutOfMemory from Standard;
|
OutOfMemory from Standard;
|
||||||
---C++: inline
|
|
||||||
|
|
||||||
Create (AnArray : Array2)
|
Create (AnArray : Array2)
|
||||||
returns Array2 from TCollection
|
returns Array2 from TCollection
|
||||||
---Purpose: creates an Array2 by copy of an Array2.
|
---Purpose: creates an Array2 by copy of an Array2.
|
||||||
raises OutOfMemory from Standard is private ;
|
raises OutOfMemory from Standard is private ;
|
||||||
---C++: inline
|
|
||||||
|
|
||||||
Create (Item : Array2Item; R1, R2, C1, C2: Integer from Standard)
|
Create (Item : Array2Item; R1, R2, C1, C2: Integer from Standard)
|
||||||
returns Array2 from TCollection
|
returns Array2 from TCollection
|
||||||
@ -75,11 +73,9 @@ is
|
|||||||
raises
|
raises
|
||||||
RangeError from Standard,
|
RangeError from Standard,
|
||||||
OutOfMemory from Standard;
|
OutOfMemory from Standard;
|
||||||
---C++: inline
|
|
||||||
|
|
||||||
Init(me : in out; V : Array2Item);
|
Init(me : in out; V : Array2Item);
|
||||||
---Purpose: Initializes this array with the value <Value>.
|
---Purpose: Initializes this array with the value <Value>.
|
||||||
---C++: inline
|
|
||||||
|
|
||||||
Destroy (me : in out );
|
Destroy (me : in out );
|
||||||
---Level: Advanced
|
---Level: Advanced
|
||||||
@ -88,7 +84,6 @@ is
|
|||||||
-- DoubleArray the Destroy doesn't delete the area.
|
-- DoubleArray the Destroy doesn't delete the area.
|
||||||
--
|
--
|
||||||
---C++: alias ~
|
---C++: alias ~
|
||||||
---C++: inline
|
|
||||||
|
|
||||||
Assign (me: in out; Other: Array2)
|
Assign (me: in out; Other: Array2)
|
||||||
returns Array2 from TCollection
|
returns Array2 from TCollection
|
||||||
|
@ -59,6 +59,73 @@ void TCollection_Array2::Allocate ()
|
|||||||
myData = (void*) (q - myLowerRow);
|
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
|
//function : Assign
|
||||||
|
@ -21,74 +21,6 @@
|
|||||||
|
|
||||||
#include Array2Item_hxx
|
#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
|
//function : ColLength
|
||||||
//purpose :
|
//purpose :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user