Standard_Size i;
//
for (i=0; i<mySize; ++i) {
- myData[i].~Type();
+ myData[i].~Type();
}
myAllocator->Free((Standard_Address&)myData);
//
}
// SetRange
void SetRange(const Standard_Integer theI1,
- const Standard_Integer theI2) {
+ const Standard_Integer theI2) {
myI1=theI1;
myI2=theI2;
}
// Range
void Range(Standard_Integer& theI1,
- Standard_Integer& theI2) const {
+ Standard_Integer& theI2) const {
theI1=myI1;
theI2=myI2;
}
}
// SetValue
void SetValue(const Standard_Integer theIndex,
- const Type& theValue) {
+ const Type& theValue) {
*(myData+theIndex-myI1)=theValue;
}
// Value
myExtent=0;
}
// SetStartSize
- void SetStartSize(const Standard_Size theSize) {
+ void SetStartSize(const Standard_Integer theSize) {
if (theSize>0) {
myStartSize=theSize;
}
}
// SetIncrement
- void SetIncrement(const Standard_Size theSize){
+ void SetIncrement(const Standard_Integer theSize){
if (theSize>0) {
myIncrement=theSize;
}
}
// Increment
- Standard_Size Increment()const {
+ Standard_Integer Increment()const {
return myIncrement;
}
// Extent
- Standard_Size Extent()const {
+ Standard_Integer Extent()const {
return myExtent;
}
// Size
- Standard_Size Size()const {
+ Standard_Integer Size()const {
return myExtent;
}
// Size
- Standard_Size Length()const {
+ Standard_Integer Length()const {
return myExtent;
}
// Init
Standard_Integer Append();
// SetValue
void SetValue(const Standard_Integer theIndex,
- const Type& theValue);
+ const Type& theValue);
// Value
const Type& operator()(const Standard_Integer theIndex)const;
//
//==========
// fields
protected:
- Standard_Size myStartSize;
- Standard_Size myIncrement;
- Standard_Size myExtent;
+ Standard_Integer myStartSize;
+ Standard_Integer myIncrement;
+ Standard_Integer myExtent;
Type myDfltItem;
BOPCol_MemBlock<Type> * myPBlock;
BOPCol_MemBlock<Type> * myPBlock1;
while(1) {
pNext=pBlock->myNext;
if(!pNext) {
- myPBlock=pBlock;
- break;
+ myPBlock=pBlock;
+ break;
}
pBlock=pNext;
}
while(1) {
pNext=pBlock->myNext;
if(!pNext) {
- myPBlock=pBlock;
- break;
+ myPBlock=pBlock;
+ break;
}
pBlock=pNext;
}
//=======================================================================
template <class Type>
void BOPCol_Array1<Type>::SetValue(const Standard_Integer theIndex,
- const Type& theValue) {
+ const Type& theValue) {
if (FindBlock(theIndex)) {
myPBlock->SetValue(theIndex, theValue);
}
i2=myStartSize-1;
do {
if (theIndex>=i1 && theIndex<=i2) {
- *xPBlock=pBlock;
- return !bRet;
+ *xPBlock=pBlock;
+ return !bRet;
}
//
i1=i2+1;
* @param theNbPoints
* number of intersection points
*/
- void Init(const Standard_Size theNbCurves,
- const Standard_Size theNbPoints) {
- if (theNbCurves) {
+ void Init(const Standard_Integer theNbCurves,
+ const Standard_Integer theNbPoints) {
+ if (theNbCurves>0) {
myCurves.SetStartSize(theNbCurves);
myCurves.SetIncrement(theNbCurves);
myCurves.Init();
}
- if (theNbPoints) {
+ if (theNbPoints>0) {
myPoints.SetStartSize(theNbPoints);
myPoints.SetIncrement(theNbPoints);
myPoints.Init();