diff --git a/src/util.h b/src/util.h index 3c461dc3..66d2b22a 100755 --- a/src/util.h +++ b/src/util.h @@ -111,20 +111,20 @@ public: void Enlarge ( const int iAddedSize ) { - resize ( size() + iAddedSize ); + std::vector::resize ( std::vector::size() + iAddedSize ); } void Add ( const TData& tI ) { Enlarge ( 1 ); - back() = tI; + std::vector::back() = tI; } int StringFiFoWithCompare ( const QString strNewValue, const bool bDoAdding = true ); // this function simply converts the type of size to integer - inline int Size() const { return size(); } + inline int Size() const { return std::vector::size(); } // This operator allows for a l-value assignment of this object: // CVector[x] = y is possible @@ -173,8 +173,8 @@ public: template void CVector::Init ( const int iNewSize ) { // clear old buffer and reserve memory for new buffer - clear(); - resize ( iNewSize ); + std::vector::clear(); + std::vector::resize ( iNewSize ); } template void CVector::Init ( const int iNewSize, @@ -248,7 +248,7 @@ public: CVector ( iNeSi, tInVa ), iCurIdx ( 0 ) {} void Add ( const TData tNewD ); - inline TData Get() { return operator[] ( iCurIdx ); } + inline TData Get() { return CVector::operator[] ( iCurIdx ); } virtual void Init ( const int iNewSize ); @@ -274,12 +274,12 @@ template void CFIFO::Init ( const int iNewSize, template void CFIFO::Add ( const TData tNewD ) { - operator[] ( iCurIdx ) = tNewD; + CVector::operator[] ( iCurIdx ) = tNewD; // increment index and check for wrap around iCurIdx++; - if ( iCurIdx >= Size() ) + if ( iCurIdx >= CVector::Size() ) { iCurIdx = 0; } @@ -322,9 +322,9 @@ public: double InitializationState() const { // make sure we do not divide by zero - if ( Size() != 0 ) + if ( CVector::Size() != 0 ) { - return static_cast ( iNorm ) / Size(); + return static_cast ( iNorm ) / CVector::Size(); } else { @@ -366,21 +366,21 @@ template void CMovingAv::Add ( const TData tNewD ) */ // subtract oldest value - dCurAvResult -= operator[] ( iCurIdx ); + dCurAvResult -= CVector::operator[] ( iCurIdx ); // add new value and write in memory dCurAvResult += tNewD; - operator[] ( iCurIdx ) = tNewD; + CVector::operator[] ( iCurIdx ) = tNewD; // increase position pointer and test if wrap iCurIdx++; - if ( iCurIdx >= Size() ) + if ( iCurIdx >= CVector::Size() ) { iCurIdx = 0; } // take care of norm - if ( iNorm < Size() ) + if ( iNorm < CVector::Size() ) { iNorm++; }