1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-21 10:13:43 +03:00

0023809: New compiler warnings in new BOP, 64-bit VC++ 9.0.

Standard_Size have been replaced by Standard_Integer to avoid warnings.
This commit is contained in:
emv 2013-03-12 16:31:02 +04:00
parent 1d8ec4db0a
commit a82b7ef700
2 changed files with 25 additions and 25 deletions

View File

@ -70,7 +70,7 @@ template <class Type> class BOPCol_MemBlock {
Standard_Size i; Standard_Size i;
// //
for (i=0; i<mySize; ++i) { for (i=0; i<mySize; ++i) {
myData[i].~Type(); myData[i].~Type();
} }
myAllocator->Free((Standard_Address&)myData); myAllocator->Free((Standard_Address&)myData);
// //
@ -97,13 +97,13 @@ template <class Type> class BOPCol_MemBlock {
} }
// SetRange // SetRange
void SetRange(const Standard_Integer theI1, void SetRange(const Standard_Integer theI1,
const Standard_Integer theI2) { const Standard_Integer theI2) {
myI1=theI1; myI1=theI1;
myI2=theI2; myI2=theI2;
} }
// Range // Range
void Range(Standard_Integer& theI1, void Range(Standard_Integer& theI1,
Standard_Integer& theI2) const { Standard_Integer& theI2) const {
theI1=myI1; theI1=myI1;
theI2=myI2; theI2=myI2;
} }
@ -113,7 +113,7 @@ template <class Type> class BOPCol_MemBlock {
} }
// SetValue // SetValue
void SetValue(const Standard_Integer theIndex, void SetValue(const Standard_Integer theIndex,
const Type& theValue) { const Type& theValue) {
*(myData+theIndex-myI1)=theValue; *(myData+theIndex-myI1)=theValue;
} }
// Value // Value
@ -193,31 +193,31 @@ template <class Type> class BOPCol_Array1 {
myExtent=0; myExtent=0;
} }
// SetStartSize // SetStartSize
void SetStartSize(const Standard_Size theSize) { void SetStartSize(const Standard_Integer theSize) {
if (theSize>0) { if (theSize>0) {
myStartSize=theSize; myStartSize=theSize;
} }
} }
// SetIncrement // SetIncrement
void SetIncrement(const Standard_Size theSize){ void SetIncrement(const Standard_Integer theSize){
if (theSize>0) { if (theSize>0) {
myIncrement=theSize; myIncrement=theSize;
} }
} }
// Increment // Increment
Standard_Size Increment()const { Standard_Integer Increment()const {
return myIncrement; return myIncrement;
} }
// Extent // Extent
Standard_Size Extent()const { Standard_Integer Extent()const {
return myExtent; return myExtent;
} }
// Size // Size
Standard_Size Size()const { Standard_Integer Size()const {
return myExtent; return myExtent;
} }
// Size // Size
Standard_Size Length()const { Standard_Integer Length()const {
return myExtent; return myExtent;
} }
// Init // Init
@ -228,7 +228,7 @@ template <class Type> class BOPCol_Array1 {
Standard_Integer Append(); Standard_Integer Append();
// SetValue // SetValue
void SetValue(const Standard_Integer theIndex, void SetValue(const Standard_Integer theIndex,
const Type& theValue); const Type& theValue);
// Value // Value
const Type& operator()(const Standard_Integer theIndex)const; const Type& operator()(const Standard_Integer theIndex)const;
// //
@ -250,9 +250,9 @@ template <class Type> class BOPCol_Array1 {
//========== //==========
// fields // fields
protected: protected:
Standard_Size myStartSize; Standard_Integer myStartSize;
Standard_Size myIncrement; Standard_Integer myIncrement;
Standard_Size myExtent; Standard_Integer myExtent;
Type myDfltItem; Type myDfltItem;
BOPCol_MemBlock<Type> * myPBlock; BOPCol_MemBlock<Type> * myPBlock;
BOPCol_MemBlock<Type> * myPBlock1; BOPCol_MemBlock<Type> * myPBlock1;
@ -287,8 +287,8 @@ template <class Type>
while(1) { while(1) {
pNext=pBlock->myNext; pNext=pBlock->myNext;
if(!pNext) { if(!pNext) {
myPBlock=pBlock; myPBlock=pBlock;
break; break;
} }
pBlock=pNext; pBlock=pNext;
} }
@ -324,8 +324,8 @@ template <class Type>
while(1) { while(1) {
pNext=pBlock->myNext; pNext=pBlock->myNext;
if(!pNext) { if(!pNext) {
myPBlock=pBlock; myPBlock=pBlock;
break; break;
} }
pBlock=pNext; pBlock=pNext;
} }
@ -352,7 +352,7 @@ template <class Type>
//======================================================================= //=======================================================================
template <class Type> template <class Type>
void BOPCol_Array1<Type>::SetValue(const Standard_Integer theIndex, void BOPCol_Array1<Type>::SetValue(const Standard_Integer theIndex,
const Type& theValue) { const Type& theValue) {
if (FindBlock(theIndex)) { if (FindBlock(theIndex)) {
myPBlock->SetValue(theIndex, theValue); myPBlock->SetValue(theIndex, theValue);
} }
@ -418,8 +418,8 @@ template <class Type>
i2=myStartSize-1; i2=myStartSize-1;
do { do {
if (theIndex>=i1 && theIndex<=i2) { if (theIndex>=i1 && theIndex<=i2) {
*xPBlock=pBlock; *xPBlock=pBlock;
return !bRet; return !bRet;
} }
// //
i1=i2+1; i1=i2+1;

View File

@ -545,14 +545,14 @@ class BOPDS_InterfFF : public BOPDS_Interf {
* @param theNbPoints * @param theNbPoints
* number of intersection points * number of intersection points
*/ */
void Init(const Standard_Size theNbCurves, void Init(const Standard_Integer theNbCurves,
const Standard_Size theNbPoints) { const Standard_Integer theNbPoints) {
if (theNbCurves) { if (theNbCurves>0) {
myCurves.SetStartSize(theNbCurves); myCurves.SetStartSize(theNbCurves);
myCurves.SetIncrement(theNbCurves); myCurves.SetIncrement(theNbCurves);
myCurves.Init(); myCurves.Init();
} }
if (theNbPoints) { if (theNbPoints>0) {
myPoints.SetStartSize(theNbPoints); myPoints.SetStartSize(theNbPoints);
myPoints.SetIncrement(theNbPoints); myPoints.SetIncrement(theNbPoints);
myPoints.Init(); myPoints.Init();