diff --git a/src/NCollection/NCollection_BaseVector.cxx b/src/NCollection/NCollection_BaseVector.cxx index f830bbbc58..633ba1e48d 100755 --- a/src/NCollection/NCollection_BaseVector.cxx +++ b/src/NCollection/NCollection_BaseVector.cxx @@ -125,7 +125,7 @@ void * NCollection_BaseVector::ExpandV (const Standard_Integer theIndex) MemBlock& aLastBlock = myData [myNBlocks - 1]; Standard_RangeError_Raise_if (theIndex < aLastBlock.FirstIndex(), "NColelction_BaseVector::ExpandV"); - const unsigned int anIndLastBlock = theIndex - aLastBlock.FirstIndex(); + Standard_Integer anIndLastBlock = theIndex - aLastBlock.FirstIndex(); // Is there still room for 1 item in the last array? if (anIndLastBlock < aLastBlock.Size()) { myLength = aNewLength; diff --git a/src/NCollection/NCollection_BaseVector.hxx b/src/NCollection/NCollection_BaseVector.hxx index bf1d1473fe..f57cac7068 100755 --- a/src/NCollection/NCollection_BaseVector.hxx +++ b/src/NCollection/NCollection_BaseVector.hxx @@ -45,14 +45,14 @@ class NCollection_BaseVector : myAlloc(theAlloc), myFirstInd(theFirstInd), myLength(0), mySize(theLength), myData(0L) {} virtual void Reinit (const Standard_Integer, - const size_t) {} + const Standard_Integer) {} Standard_Integer FirstIndex () const { return myFirstInd; } - size_t Size () const { return mySize; } + Standard_Integer Size () const { return mySize; } public: virtual ~MemBlock () {} - void SetLength (const size_t theLen) + void SetLength (const Standard_Integer theLen) { myLength = theLen; } - size_t Length () const { return myLength; } + Standard_Integer Length () const { return myLength; } void * Find (const Standard_Integer theInd, const size_t theSize) const { return ((char *) myData)+theInd*theSize;} @@ -60,8 +60,8 @@ class NCollection_BaseVector GetIndexV (void * theItem, const size_t theSz) const; protected: Standard_Integer myFirstInd; - size_t myLength; - size_t mySize; + Standard_Integer myLength; + Standard_Integer mySize; NCollection_BaseAllocator * myAlloc; void * myData; friend class NCollection_BaseVector; @@ -85,10 +85,10 @@ class NCollection_BaseVector { return &myVector -> myData[myICurBlock]; } const NCollection_BaseVector * myVector; // the Master vector - size_t myICurBlock; // # of the current block - size_t myIEndBlock; - size_t myCurIndex; // Index in the current block - size_t myEndIndex; + Standard_Integer myICurBlock; // # of the current block + Standard_Integer myIEndBlock; + Standard_Integer myCurIndex; // Index in the current block + Standard_Integer myEndIndex; }; protected: diff --git a/src/NCollection/NCollection_Vector.hxx b/src/NCollection/NCollection_Vector.hxx index fa687d308d..d18f669ab6 100755 --- a/src/NCollection/NCollection_Vector.hxx +++ b/src/NCollection/NCollection_Vector.hxx @@ -67,7 +67,7 @@ template class NCollection_Vector : NCollection_BaseVector::MemBlock (theFirstInd, theSize, theAlloc) { myData = myAlloc->Allocate(theSize * sizeof(TheItemType)); - for (size_t i=0; i < theSize; i++) + for (Standard_Integer i=0; i < theSize; i++) new (&((TheItemType *) myData)[i]) TheItemType; } //! Copy constructor @@ -77,7 +77,7 @@ template class NCollection_Vector { myLength = theOther.Length(); myData = myAlloc->Allocate(Size() * sizeof(TheItemType)); - size_t i; + Standard_Integer i; for (i=0; i < Length(); i++) new (&((TheItemType *) myData)[i]) TheItemType(theOther.Value(i)); for (; i < Size(); i++) @@ -85,17 +85,17 @@ template class NCollection_Vector } //! Reinit virtual void Reinit (const Standard_Integer theFirst, - const size_t theSize) + const Standard_Integer theSize) { if (myData) { - for (size_t i=0; i < mySize; i++) + for (Standard_Integer i=0; i < mySize; i++) ((TheItemType *) myData)[i].~TheItemTypeD(); myAlloc->Free(myData); myData = NULL; } if (theSize > 0) { myData = myAlloc->Allocate(theSize * sizeof(TheItemType)); - for (size_t i=0; i < theSize; i++) + for (Standard_Integer i=0; i < theSize; i++) new (&((TheItemType *) myData)[i]) TheItemType; } myFirstInd = theFirst; @@ -106,7 +106,7 @@ template class NCollection_Vector virtual ~MemBlock () { if (myData) { - for (size_t i=0; i < Size(); i++) + for (Standard_Integer i=0; i < Size(); i++) ((TheItemType *) myData)[i].~TheItemTypeD(); myAlloc->Free(myData); myData = NULL;